-
Notifications
You must be signed in to change notification settings - Fork 2
/
lx-bastion.json5
64 lines (57 loc) · 2.53 KB
/
lx-bastion.json5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
variables: {
triton_account: "{{ env `SDC_ACCOUNT` }}",
triton_key_id: "{{ env `SDC_KEY_ID` }}",
triton_key_path: "{{ env `SDC_KEY_PATH` }}",
triton_url: "{{ env `SDC_URL` }}",
triton_public_network: "{{ env `PUBLIC_NETWORK` }}",
triton_private_network: "{{ env `PRIVATE_NETWORK` }}",
image_name: "k8s-bastion-lx-16.04",
image_version: "1.0.0",
},
builders: [
{
type: "triton",
triton_url: "{{ user `triton_url` }}",
triton_account: "{{ user `triton_account` }}",
triton_key_id: "{{ user `triton_key_id` }}",
triton_key_material: "{{ user `triton_key_path` }}",
source_machine_name: "k8s-bastion-lx-builder",
source_machine_package: "g4-highcpu-2G",
source_machine_image: "7b5981c4-1889-11e7-b4c5-3f3bdfc9b88b",
// Both the private and public networks
source_machine_networks: [
"{{ user `triton_public_network` }}",
"{{ user `triton_private_network` }}",
],
// `root` user for Joyent ubuntu images
ssh_username: "root",
ssh_private_key_file: "{{ user `triton_key_path` }}",
image_name: "{{ user `image_name` }}",
image_version: "{{ user `image_version` }}",
},
],
provisioners: [
{ // Clean up the base Ubuntu image
type: "shell",
inline: [
// Log the version of the builder image
"uname -a",
// Update packaging
"apt-get update",
// Additional packages for management
"apt-get install -y bash tmux curl jq python-minimal nodejs npm",
// Fix script references to node by symlinking nodejs
"ln -s /usr/bin/nodejs /usr/bin/node",
// Install node tools
"npm install -g sshp",
// Install kubelet
"sudo wget --no-verbose -P /usr/bin https://storage.googleapis.com/kubernetes-release/release/v1.5.6/bin/linux/amd64/kubectl && sudo chmod +x /usr/bin/kubectl",
// Install etcd tools
"sudo wget --no-verbose -P /tmp https://github.com/coreos/etcd/releases/download/v3.2.0/etcd-v3.2.0-linux-amd64.tar.gz && tar -zxvf /tmp/etcd-v3.2.0-linux-amd64.tar.gz -C /tmp && sudo mv /tmp/etcd-v3.2.0-linux-amd64/etcdctl /usr/local/bin",
// Install cfssl tools
"for bin in cfssl-bundle cfssl-certinfo cfssl-newkey cfssl-scan cfssl cfssljson mkbundle multirootca; do sudo wget --no-verbose -P /usr/local/bin https://pkg.cfssl.org/R1.2/${bin}_linux-amd64 && sudo ln -s /usr/local/bin/${bin}_linux-amd64 /usr/local/bin/${bin} && sudo chmod +x /usr/local/bin/${bin}; done",
],
},
],
}