Last active
July 16, 2020 12:28
-
-
Save nopdotcom/f7f148ce57f2728b9747e8b5ad9066c5 to your computer and use it in GitHub Desktop.
A cloud-init script for striesand-builder’s dependencies. Tested on EC2, DO, GCE, Vultr.
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
#!/bin/sh | |
# | |
# This script takes a while to run. The file "ready" is created when finished. | |
# If you're logged in early, you can watch progress with the command | |
# | |
# tail -f /var/log/cloud-init-output.log | |
# | |
DEBIAN_FRONTEND=noninteractive | |
export DEBIAN_FRONTEND | |
if ! id ubuntu >/dev/null 2>&1; then | |
# Some systems don't have an ubuntu user; make an alias for root. | |
useradd --non-unique --uid 0 --gid 0 --home-dir /root -s /bin/bash ubuntu | |
fi | |
apt-get update | |
apt-get --yes upgrade | |
apt-get --yes install python-pip git build-essential python-dev python-setuptools | |
# We only really wanted python-pip for its dependencies. | |
pip install --upgrade pip | |
# The pip we want should be in /usr/local now. Don't fail if it didn't install right. | |
hash -r | |
pip install boto msrest msrestazure azure==2.0.0rc5 dopy==0.3.5 "apache-libcloud>=1.5.0" linode-python pyrax | |
pip install ansible | |
sudo -i -u ubuntu git clone https://github.com/jlund/streisand.git | |
sudo -i -u ubuntu mkdir -p .ssh | |
sudo -i -u ubuntu bash -c "ssh-keygen -f .ssh/id_rsa -N ''" | |
sudo -i -u ubuntu touch ready | |
wall "Streisand is ready." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment