Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC iiab-upgrade #134

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
49af2f1
iiab-upgrade
jvonau Sep 1, 2020
4812900
self-install from git repo
jvonau Sep 1, 2020
56d4f52
upgrade_roles
jvonau Sep 2, 2020
98a4c9d
iiab_revision
jvonau Sep 2, 2020
add7efa
fall though to iiab-install on first pass
jvonau Sep 2, 2020
8bda0da
skipping re-exec
jvonau Sep 2, 2020
1623df6
grouping - move kernel test to the end
jvonau Sep 3, 2020
8ac513c
whiptail for check_branch dialog
jvonau Sep 3, 2020
4f0fa74
refactor check_revision
jvonau Sep 4, 2020
a791f40
check complete flag after check_revision
jvonau Sep 12, 2020
934f1be
7.2-install.txt
jvonau Sep 4, 2020
fd50cb3
ansible
jvonau Sep 4, 2020
2f7f428
OS check
jvonau Sep 7, 2020
a68cfe3
--remove-destination
jvonau Sep 9, 2020
e976f85
update_self format
jvonau Sep 4, 2020
e81f34b
whiptail for passwords
jvonau Sep 4, 2020
78345b2
use 'role directory & installed marker differ' from runrole
jvonau Sep 13, 2020
746c6ad
add oldver feedback
jvonau Sep 16, 2020
152ddba
revert the use of -t
jvonau Sep 16, 2020
c24e996
ansible upgrades from 2.9.x to 2.10.1 use apt to remove ansible first
jvonau Sep 16, 2020
3e46fab
invert interactive to optin - for testing whiptail menus
jvonau Sep 17, 2020
b305674
check_kernel refactor for standalone use
jvonau Sep 17, 2020
1de89be
update continue warning
jvonau Sep 17, 2020
e5387f1
curl will use interactive mode
jvonau Sep 18, 2020
9ac4b64
branch feedback and pull -q
jvonau Sep 19, 2020
b9f54ed
upgrades_roles portability
jvonau Sep 19, 2020
ef09ab1
check for root - user feedback
jvonau Sep 19, 2020
7db3399
pi-gen test
jvonau Sep 20, 2020
c8867c0
upgrades are at stage 9
jvonau Sep 20, 2020
af821e6
non-interactive skip iiab-admin creation
jvonau Sep 24, 2020
090b2c9
non-interactive skip bittorrent start
jvonau Sep 24, 2020
49af935
update iiab branch and repo
jvonau Sep 24, 2020
b517e4c
bump upgrade_roles
jvonau Sep 26, 2020
07a9f79
test branch delete
jvonau Sep 26, 2020
5c216e6
don't 'tunefs' in non-interactive - like second pass though 'iiab' bu…
jvonau Sep 30, 2020
a0a8c05
upgrade updates
jvonau Oct 12, 2020
37edfb5
add logic for admin_console_install & admin_console_enabled
jvonau Oct 12, 2020
53a5b74
add some cheap metrics
jvonau Oct 14, 2020
33deb8c
latest round of changes
jvonau Nov 3, 2020
db8f6b3
should be good to go
jvonau Nov 4, 2020
c1ba82f
more updates
jvonau Nov 4, 2020
f1a35ff
bump release
jvonau Nov 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 125 additions & 0 deletions 7.2-install.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
#!/bin/bash
# Copied https://github.com/jvonau/iiab-factory/master/7.2-install.txt
# Copied from: https://github.com/jvonau/iiab-factory/blob/jv-pi-gen/install.txt
# Copied from: https://github.com/iiab/iiab-factory/blob/master/install.txt
# To install Internet-in-a-Box (IIAB) 7.2 / pre-release onto Raspberry Pi OS,
# Ubuntu 20.04 or Debian 10, run this 1-line installer:
#
# curl https://raw.githubusercontent.com/jvonau/iiab-factory/master/7.2-install.txt | sudo bash
#
# 1. WHEN YOU RUN 1-LINE INSTALLER FROM ABOVE
# YOU THEN NEED TO TYPE IN YOUR PASSWORD IF ON UBUNTU/DEBIAN/ETC (for sudo)
# ^^^ ^^^^ ^^^^ ^^ ^^^^ ^^ ^^^^ ^^^^^^^^
#
# 2. WARNING: NOOBS IS *NOT* SUPPORTED, as its partitioning is very different.
# On a Raspberry Pi, WE RECOMMEND YOU INSTALL THE LATEST RASPBERRY PI OS:
# https://www.raspberrypi.org/documentation/installation/installing-images/README.md
# To attempt IIAB 7.2 on another Linux see the full/manual instructions:
# https://github.com/iiab/iiab/wiki/IIAB-Installation#do-everything-from-scratch

# 3. An Ethernet cable is HIGHLY RECOMMENDED during installation, as this is
# more reliable than Wi-Fi (and faster!)

# 4. Run 'sudo raspi-config' on RPi, to set LOCALISATION OPTIONS

# 5. OPTIONAL: if you have slow/pricey Internet, pre-position KA Lite's
# mandatory 0.9 GB English Pack (en.zip) within /tmp -- you can grab a copy
# from http://pantry.learningequality.org/downloads/ka-lite/0.17/content/contentpacks/en.zip

# 6. Follow on-screen instructions (TYPE 'sudo iiab-upgrade' TO RESUME IF EVER NECESS!)

# 7. About 1-2 hours later, it will announce that INTERNET-IN-A-BOX (IIAB)
# SOFTWARE INSTALL IS COMPLETE, prompting you to reboot...TO ADD CONTENT!

# Thanks For Building Your Own Library To Serve One & All
#
# DRAFT IIAB 7.2 Release Notes:
# https://github.com/iiab/iiab/wiki/IIAB-7.2-Release-Notes
#
# Write to bugs @ iiab.io if you find issues, Thank You! Special Thanks to the
# countries+communities+volunteers who worked non-stop to bring about IIAB 7.2!
#
# IIAB Development Team
# http://FAQ.IIAB.IO

set -e # Exit on error (avoids snowballing)
export DEBIAN_FRONTEND=noninteractive # Bypass (most!) interactive questions
BASE=/opt/iiab
BRANCH=release-7.2
ADMBRANCH=master
OS=`grep ^ID= /etc/*elease|cut -d= -f2`
OS=${OS//\"/}
if [ -f /etc/rpi-issue ]; then
OS="raspbian"
fi
VERSION_ID=`grep VERSION_ID /etc/*elease | cut -d= -f2`
VERSION_ID=${VERSION_ID//\"/}
VERSION_ID=${VERSION_ID%%.*}
OS_VER=$OS-$VERSION_ID

not_supported(){
echo "Can't detect supported Distro"
}

case $OS_VER in
"debian-10" | "ubuntu-20" | "linuxmint-20" | "raspbian-10")
;;
*)
not_supported
exit 1
;;
esac

# Everything else needs to be run as root
if [ $(id -u) -ne 0 ]; then
echo -e "$SCRIPT must be run as root. Try 'sudo $SCRIPT'\n"
exit 1
fi


echo -e "\n\nDOWNLOAD (CLONE) IIAB'S 3 KEY REPOS INTO $BASE ...\n"
/usr/bin/apt -y install git nano whiptail
mkdir -p $BASE
cd $BASE
echo
if [ -d iiab-factory ]; then
echo -e "REPO iiab-factory EXISTS? -- updating master branch"
cd iiab-factory
git checkout master
git pull -q
echo -e "Creating branch $BRANCH"
git branch -D $BRANCH &> /dev/null || true
git checkout -b $BRANCH
cp --remove-destination $BASE/iiab-factory/iiab /usr/sbin/iiab
cp --remove-destination $BASE/iiab-factory/iiab-upgrade /usr/sbin/iiab-upgrade
else
echo -e "Cloning iiab-factory"
git clone https://github.com/iiab/iiab-factory --depth 1
cd iiab-factory
echo -e "Creating branch $BRANCH"
git checkout -b $BRANCH
cp $BASE/iiab-factory/iiab /usr/sbin/iiab
cp $BASE/iiab-factory/iiab-upgrade /usr/sbin/iiab-upgrade
fi
cd $BASE
echo
if [ -d iiab ]; then
echo -e "REPO iiab EXISTS?"
else
cd iiab
git clone https://github.com/iiab/iiab --depth 10 --branch master
echo -e "Creating branch $BRANCH"
git checkout -b $BRANCH
fi
cd $BASE
echo
if [ -d iiab-admin-console ]; then
echo -e "REPO iiab-admin-console EXISTS?"
else
git clone https://github.com/iiab/iiab-admin-console --depth 1 --branch ADMBRANCH
echo -e "Creating branch $BRANCH"
git checkout -b $BRANCH
fi

# Run install script!
/usr/sbin/iiab-upgrade --interactive
Loading