github.com/inflatablewoman/deis@v1.0.1-0.20141111034523-a4511c46a6ce/contrib/coreos/user-data.example (about) 1 #cloud-config 2 --- 3 coreos: 4 etcd: 5 # generate a new token for each unique cluster from https://discovery.etcd.io/new 6 # uncomment the following line and replace it with your discovery URL 7 # discovery: https://discovery.etcd.io/12345693838asdfasfadf13939923 8 addr: $private_ipv4:4001 9 peer-addr: $private_ipv4:7001 10 # give etcd more time if it's under heavy load - prevent leader election thrashing 11 peer-election-timeout: 2000 12 # heartbeat interval should ideally be 1/4 or 1/5 of peer election timeout 13 peer-heartbeat-interval: 500 14 fleet: 15 # We have to set the public_ip here so this works on Vagrant -- otherwise, Vagrant VMs 16 # will all publish the same private IP. This is harmless for cloud providers. 17 public-ip: $private_ipv4 18 # allow etcd to slow down at times 19 etcd_request_timeout: 3 20 units: 21 - name: etcd.service 22 command: start 23 - name: fleet.service 24 command: start 25 - name: fleet.socket 26 command: start 27 content: | 28 [Socket] 29 # Talk to the API over a Unix domain socket (default) 30 ListenStream=/var/run/fleet.sock 31 Service=fleet.service 32 33 [Install] 34 WantedBy=sockets.target 35 - name: stop-update-engine.service 36 command: start 37 content: | 38 [Unit] 39 Description=stop update-engine 40 41 [Service] 42 Type=oneshot 43 ExecStart=/usr/bin/systemctl stop update-engine.service 44 ExecStartPost=/usr/bin/systemctl mask update-engine.service 45 - name: install-deisctl.service 46 command: start 47 content: | 48 [Unit] 49 Description=Install deisctl utility 50 51 [Service] 52 Type=oneshot 53 ExecStart=/usr/bin/sh -c 'curl -sSL --retry 5 --retry-delay 2 http://deis.io/deisctl/install.sh | sh -s 1.0.0' 54 write_files: 55 - path: /etc/deis-release 56 content: | 57 DEIS_RELEASE=v1.0.0 58 - path: /etc/motd 59 content: " \e[31m* * \e[34m* \e[32m***** \e[39mddddd eeeeeee iiiiiii ssss\n\e[31m* * \e[34m* * \e[32m* * \e[39md d e e i s s\n \e[31m* * \e[34m***** \e[32m***** \e[39md d e i s\n\e[32m***** \e[31m* * \e[34m* \e[39md d e i s\n\e[32m* * \e[31m* * \e[34m* * \e[39md d eee i sss\n\e[32m***** \e[31m* * \e[34m***** \e[39md d e i s\n \e[34m* \e[32m***** \e[31m* * \e[39md d e i s\n \e[34m* * \e[32m* * \e[31m* * \e[39md d e e i s s\n\e[34m***** \e[32m***** \e[31m* * \e[39mddddd eeeeeee iiiiiii ssss\n\n\e[39mWelcome to Deis\t\t\tPowered by Core\e[38;5;45mO\e[38;5;206mS\e[39m\n" 60 - path: /etc/profile.d/nse-function.sh 61 permissions: '0755' 62 content: | 63 function nse() { 64 docker exec -it $1 bash 65 } 66 - path: /run/deis/bin/get_image 67 permissions: '0755' 68 content: | 69 #!/bin/bash 70 # usage: get_image <component_path> 71 IMAGE=`etcdctl get $1/image 2>/dev/null` 72 73 # if no image was set in etcd, we use the default plus the release string 74 if [ $? -ne 0 ]; then 75 RELEASE=`etcdctl get /deis/platform/version 2>/dev/null` 76 77 # if no release was set in etcd, use the default provisioned with the server 78 if [ $? -ne 0 ]; then 79 source /etc/deis-release 80 RELEASE=$DEIS_RELEASE 81 fi 82 83 IMAGE=$1:$RELEASE 84 fi 85 86 # remove leading slash 87 echo ${IMAGE#/} 88 - path: /opt/bin/deis-debug-logs 89 permissions: '0755' 90 content: | 91 #!/bin/bash 92 93 echo '--- VERSIONS ---' 94 source /etc/os-release 95 echo $PRETTY_NAME 96 source /etc/deis-release 97 echo "Deis $DEIS_RELEASE" 98 etcd -version 99 fleet -version 100 printf "\n" 101 102 echo '--- SYSTEM STATUS ---' 103 journalctl -n 50 -u etcd --no-pager 104 journalctl -n 50 -u fleet --no-pager 105 printf "\n" 106 107 echo '--- DEIS STATUS ---' 108 deisctl list 109 etcdctl ls --recursive /deis 110 printf "\n" 111 - path: /home/core/.toolboxrc 112 owner: core 113 content: | 114 TOOLBOX_DOCKER_IMAGE=ubuntu-debootstrap 115 TOOLBOX_DOCKER_TAG=14.04 116 TOOLBOX_USER=root