Skip to content

Instantly share code, notes, and snippets.

@robbydooo
Last active August 15, 2017 18:20
Show Gist options
  • Save robbydooo/6da8dec616ccb02f4d4d to your computer and use it in GitHub Desktop.
Save robbydooo/6da8dec616ccb02f4d4d to your computer and use it in GitHub Desktop.
Docker Datacenter Cloud Init including Flocker
#cloud-config
package_upgrade: true
runcmd:
- rpm --import "https://pgp.mit.edu/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"
- yum install -y yum-utils
- yum-config-manager --add-repo https://packages.docker.com/1.10/yum/repo/main/centos/7
- yum install -y docker-engine
- yum list installed clusterhq-release || yum install -y https://clusterhq-archive.s3.amazonaws.com/centos/clusterhq-release$(rpm -E %dist).noarch.rpm
- yum install -y clusterhq-flocker-node
- yum install -y clusterhq-flocker-docker-plugin
- systemctl enable docker.service
- systemctl start docker.service
- [ sh, -xc, "IP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')" ]
- [ sh, -xc, "docker run --rm -i --name ucp -e UCP_ADMIN_USER=<ADMINUSER> -e UCP_ADMIN_PASSWORD=<ADMINPASSWORD> -v /var/run/docker.sock:/var/run/docker.sock docker/ucp join --url https://<UCP-URL>:443 --san $IP --host-address $IP --fingerprint=<UCP-FINGERPRINT> --fresh-install "]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment