Skip to content

Instantly share code, notes, and snippets.

@WebPlatformDocs
Last active January 11, 2020 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WebPlatformDocs/d96e6a7c67c7b180e532 to your computer and use it in GitHub Desktop.
Save WebPlatformDocs/d96e6a7c67c7b180e532 to your computer and use it in GitHub Desktop.
Configuration we are using on DreamCompute to run WebPlatform Docs server setup.
# /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

WebPlatform Docs Dream Compute setup

Configuration we are using on DreamCompute to run WebPlatform Docs server setup.

  • Salt-Cloud configuration
  • cloud-init bootstraper
  • ssh jump box configuration

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment