Configuration we are using on DreamCompute to run WebPlatform Docs server setup.
- Salt-Cloud configuration
- cloud-init bootstraper
- ssh jump box configuration
# /etc/salt/cloud.profiles.d/app.conf | |
app: | |
provider: dreamcompute | |
image: Ubuntu-14.04-Trusty-latest | |
size: lightspeed | |
minion: | |
master: salt.staging.wpdn | |
grains: | |
role: app |
# /etc/salt/cloud.providers.d/dreamcompute.conf | |
dreamcompute: | |
identity_url: https://keystone.dream.io/v2.0 | |
id: aa8e4227d0d441c49e6c027a69548a6d | |
protocol: ipv4 | |
tenant: dhc1516620-1 | |
user: renbou3 | |
password: foo | |
provider: openstack |
Paste the content of this file in your local ~/.ssh/config
(ssh client configuration file).
## Use salt as a Jumb box
##
## Reference:
## - http://serverfault.com/questions/337274
## - https://wikitech.wikimedia.org/wiki/Help:Access#Using_ProxyCommand_ssh_option
## - http://blog.pluralsight.com/linux-ssh-jumpbox
Host staging.wpdn
Hostname salt.webplatformstaging.org
ProxyCommand none
Host *.staging.wpdn
ProxyCommand ssh -e @ -o StrictHostKeyChecking=no -a -W %h:%p staging.wpdn
#cloud-config | |
manage_etc_hosts: false | |
manage-resolv-conf: false | |
locale: en_US.UTF-8 | |
timezone: America/New_York | |
package_upgrade: true | |
package_update: true | |
package_reboot_if_required: true | |
bootcmd: | |
- grep -q -e 'nameserver' /etc/resolvconf/resolv.conf.d/head || printf "nameserver 10.10.10.40\n" >> /etc/resolvconf/resolv.conf.d/head | |
- grep -q -e 'wpdn' /etc/resolvconf/resolv.conf.d/base || printf "search staging.wpdn\ndomain staging.wpdn\nnameserver 8.8.8.8" > /etc/resolvconf/resolv.conf.d/base | |
- sed -i 's/$fqdn //' /etc/cloud/templates/hosts.debian.tmpl | |
- sed -i "s/^127.0.1.1 $(hostname).novalocal/127.0.1.1/g" /etc/hosts | |
- resolvconf -u | |
runcmd: | |
- apt-get install software-properties-common python-software-properties | |
- add-apt-repository -y ppa:saltstack/salt | |
- printf "deb http://ppa.launchpad.net/saltstack/salt/ubuntu trusty main" > /etc/apt/sources.list.d/saltstack-salt-trusty.list | |
packages: | |
- salt-minion | |
- screen | |
output: | |
all: | |
output: "> /var/log/cloud-init-all.log" | |
error: '&1' | |
# vim:syntax=yaml |