Skip to content
This repository was archived by the owner on Oct 31, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions instances/etcd/cloud_init/bootstrap.template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ done

# put the flannel config in etcd
curl -sf -L http://$FQDN_HOSTNAME:2379/v2/keys/flannel/network/config -X PUT --data-urlencode value@/tmp/flannel-network.json

# make sure ubuntu owns home dir
chown ubuntu:ubuntu /home/ubuntu

3 changes: 3 additions & 0 deletions instances/k8smaster/scripts/setup.template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ EXTERNAL_IP=$(curl -s -m 10 http://whatismyip.akamai.com/)
NAMESPACE=$(echo -n "${domain_name}" | sed "s/\.oraclevcn\.com//g")
FQDN_HOSTNAME=$(getent hosts $(ip route get 1 | awk '{print $NF;exit}') | awk '{print $2}')

# make sure ubuntu owns home dir
chown ubuntu:ubuntu /home/ubuntu

## create policy file that blocks autostart of services on install
printf '#!/bin/sh\necho "All runlevel operations denied by policy" >&2\nexit 101\n' >/tmp/policy-rc.d && chmod +x /tmp/policy-rc.d
ETCD_LB=${etcd_lb}
Expand Down
3 changes: 3 additions & 0 deletions instances/k8sworker/scripts/setup.template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ EXTERNAL_IP=$(curl -s -m 10 http://whatismyip.akamai.com/)
NAMESPACE=$(echo -n "${domain_name}" | sed "s/\.oraclevcn\.com//g")
FQDN_HOSTNAME=$(getent hosts $(ip route get 1 | awk '{print $NF;exit}') | awk '{print $2}')

# make sure ubuntu owns home dir
chown ubuntu:ubuntu /home/ubuntu

# pull instance metadata
curl -sL --retry 3 http://169.254.169.254/opc/v1/instance/ | tee /tmp/instance_meta.json

Expand Down