-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from benhylau/postboot-dpkg
Postboot dpkg
- Loading branch information
Showing
133 changed files
with
161 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh -e | ||
|
||
# Install local debian packages | ||
sh /root/scripts/install-packages.sh | ||
|
||
# Start system services | ||
sh /root/scripts/start-services.sh | ||
|
||
exit 0 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Tool to configure mesh-workshop node | ||
# | ||
|
||
set -e | ||
|
||
confpath=$1 | ||
nodename=$2 | ||
|
||
HOSTNAMES=(bathurst bayview bloor broadview chester christie college coxwell davisville donlands dufferin dundas dupont eglinton ellesmere finch greenwood islington jane keele kennedy king kipling lawrence leslie midland museum osgoode ossington pape queen rosedale runnymede spadina summerhill union warden wilson woodbine yorkdale) | ||
|
||
# Check required inputs | ||
if [ "$confpath" == '' ] || [ "$nodename" == '' ]; then | ||
echo 'Usage: mesh-workshop confpath nodename' | ||
echo 'Example: mesh-workshop /Volumes/BOOT/conf.d/ bloor' | ||
exit 1 | ||
fi | ||
|
||
# Make sure the path to conf.d contains conf.d | ||
echo "$confpath" | grep -E 'conf.d/?$' 1>/dev/null | ||
ret=$? | ||
if [ $ret != 0 ]; then | ||
echo 'The path to conf.d must end with conf.d' | ||
exit 1 | ||
fi | ||
|
||
# Make sure the node name is valid | ||
ret=1 | ||
for hostname in "${HOSTNAMES[@]}"; do | ||
if [ "$hostname" == "$nodename" ]; then | ||
ret=0 | ||
break | ||
fi | ||
done | ||
if [ $ret != 0 ]; then | ||
echo "Node name must match one of:" | ||
echo "${HOSTNAMES[@]}" | ||
exit 1 | ||
fi | ||
|
||
# Install files on node | ||
cp -r shared/conf.d/* "$confpath" | ||
cp -r custom/conf.d/$nodename/*.tar.gz "$confpath" | ||
echo "Installed node profile $nodename to $confpath" |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# To generate this list of .deb packages, these commands need to be run in an | ||
# Internet-connected workshop node with an empty local deb directory | ||
|
||
# TODO: This process should be moved to CI, but the commands currently need | ||
# to be run from armhf architecture and in the mesh-orange environment, the | ||
# same is true for docker containers, final artifacts should be in release | ||
# artifacts and not committed to git | ||
|
||
# Make directory to keep the downloaded .deb packages | ||
mkdir ~/deb | ||
|
||
# Download general packages needed for workshop | ||
apt update | ||
apt clean | ||
apt install --allow-unauthenticated --download-only --yes \ | ||
avahi-daemon \ | ||
bwm-ng \ | ||
ca-certificates \ | ||
curl \ | ||
iperf3 \ | ||
iputils-ping \ | ||
libnss-mdns \ | ||
nano-tiny \ | ||
netcat | ||
cp /var/cache/apt/archives/*.deb deb/ | ||
|
||
# Download packages that will become installed in the next step, but we need | ||
# their .deb packages, so we download them first | ||
apt clean | ||
apt install --allow-unauthenticated --download-only --yes \ | ||
libcurl3-gnutls \ | ||
libltdl7 | ||
cp /var/cache/apt/archives/*.deb deb/ | ||
|
||
# Download docker from its own debian source | ||
apt install --allow-unauthenticated --yes \ | ||
apt-transport-https \ | ||
ca-certificates \ | ||
curl \ | ||
gnupg2 \ | ||
software-properties-common | ||
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - | ||
echo "deb [arch=armhf] https://download.docker.com/linux/debian \ | ||
$(lsb_release -cs) stable" | \ | ||
tee /etc/apt/sources.list.d/docker.list | ||
apt update | ||
apt clean | ||
apt install --allow-unauthenticated --download-only --yes docker-ce | ||
cp /var/cache/apt/archives/*.deb deb/ | ||
|
||
# Download mesh router packages | ||
(cd deb && curl --location --remote-name https://github.com/benhylau/mesh-router-builder/releases/download/v0.10/cjdns_20.2-0.10_armhf.deb) | ||
(cd deb && curl --location --remote-name https://github.com/benhylau/mesh-router-builder/releases/download/v0.10/yggdrasil-go_0.3.0-0.10_armhf.deb) | ||
|
||
# If packages are missing dependencies this command could be helpful | ||
#apt install --download-only --fix-broken --yes |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+7.71 MB
src/shared/deb/docker-ce-cli_5%3a18.09.0~3-0~debian-stretch_armhf.deb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+65.1 KB
src/shared/deb/libsasl2-modules-db_2.1.27~101-g0780600+dfsg-3_armhf.deb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
mount /dev/mmcblk0p1 /mnt | ||
|
||
# Install local debian packages | ||
dpkg --install /mnt/conf.d/deb/*.deb | ||
|
||
umount /mnt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
mount /dev/mmcblk0p1 /mnt | ||
|
||
# Load ipfs docker archive | ||
docker load --input /mnt/conf.d/docker/tomeshnet-ipfs-0.1.tar | ||
|
||
# Start ipfs docker container | ||
docker run --name ipfs --network host --detach tomeshnet/ipfs:0.1 | ||
|
||
umount /mnt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Reload systemd manager configuration | ||
systemctl daemon-reload | ||
|
||
# Start mesh services | ||
systemctl start cjdns | ||
systemctl start yggdrasil | ||
|
||
# Start mdns service | ||
systemctl start avahi-daemon |
File renamed without changes.
File renamed without changes.