|
#!/bin/sh |
|
|
|
echo ---------------------------------------- |
|
echo Updating... |
|
echo ---------------------------------------- |
|
sudo apt-get -y update |
|
sudo apt-get -y upgrade |
|
sudo apt-get autoremove |
|
sudo apt-get autoclean |
|
|
|
echo ---------------------------------------- |
|
echo Installing Shared Components... |
|
echo ---------------------------------------- |
|
sudo apt-get -y install git |
|
sudo apt-get -y install python-pip |
|
sudo apt-get -y install samba |
|
|
|
echo ---------------------------------------- |
|
echo Installing Docker... |
|
echo ---------------------------------------- |
|
sudo sed -i 's|ID=raspbian|ID=debian|' /etc/os-release |
|
sudo docker --version || curl -sSL https://get.docker.com | sh |
|
sudo systemctl enable docker |
|
sudo systemctl start docker |
|
sudo usermod -aG docker pi |
|
|
|
echo ---------------------------------------- |
|
echo Installing AWS CLI... |
|
echo ---------------------------------------- |
|
pip install awscli --upgrade --user |
|
aws --version || export PATH=$PATH:~/.local/bin |
|
aws configure |
|
|
|
echo ---------------------------------------- |
|
echo Configuring AWS Docker Repository... |
|
echo ---------------------------------------- |
|
aws ecr get-login --no-include-email --region us-east-1 | sh |
|
sudo docker run 757558210780.dkr.ecr.us-east-1.amazonaws.com/rbwestmoreland/helloworld:arm32v7 |
|
|
|
echo ---------------------------------------- |
|
echo Installing boot.sh... |
|
echo ---------------------------------------- |
|
sudo rm -rf /usr/bin/rbwestmoreland |
|
sudo git clone https://gist.github.com/7a61a8d87f82fde770ccb5fa3609e912.git /usr/bin/rbwestmoreland |
|
sudo grep -q "/usr/bin/rbwestmoreland/boot.sh" /etc/rc.local || sudo sed -i -e '$i sh /usr/bin/rbwestmoreland/boot.sh\n' /etc/rc.local |
|
|
|
echo ---------------------------------------- |
|
echo Complete! |
|
echo ---------------------------------------- |