Created
August 18, 2017 14:28
-
-
Save nopdotcom/032cb37d8a80cb963759baca1ae26755 to your computer and use it in GitHub Desktop.
Streisand cloud-init for Lightsail and DigitalOcean
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 | |
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 | |
pip install ansible boto msrest msrestazure azure==2.0.0rc5 dopy==0.3.5 "apache-libcloud>=1.5.0" linode-python pyrax | |
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