blob: 4c51616f1684dfe2f5cc6d1f97dc40b5050fc9d6 [file] [log] [blame]
Pavel Glazov2871c3d2022-12-22 20:53:49 +04001#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
2
3ssh_pwauth: True
4users:
5 - name: root
6 sudo: ALL=(ALL) NOPASSWD:ALL
7 shell: /bin/bash
8 - name: jenkins
9 sudo: ALL=(ALL) NOPASSWD:ALL
10 shell: /bin/bash
11 ssh_authorized_keys:
12 - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFSxeuXh2sO4VYL8N2dlNFVyNcr2RvoH4MeDD/cV2HThfU4/BcH6IOOWXSDibIU279bWVKCL7QUp3mf0Vf7HPuyFuC12QM+l7MwT0jCYh5um3hmAvM6Ga0nkhJygHexe9/rLEYzZJkIjP9/IS/YXSv8rhHg484wQ6qkEuq15nyMqil8tbDQCq0XQ+AWEpNpIa4pUoKmFMsOP8lq10KZXIXsJyZxizadr6Bh4Lm9LWrk8YCw7qP3rmgWxK/s8qXQh1ISZe6ONfcmk6p03qbh4H3CwKyWzxmnIHQvE6PgN/O+PuAZj3PbR2mkkJjYX4jNPlxvj8uTStaVPhAwfR9Spdx jenkins@cz8133
13
14disable_root: false
15chpasswd:
16 list: |
17 root:r00tme
18 jenkins:qalab
19 expire: False
20
21packages:
22 - openjdk-8-jre-headless
23 - libyaml-dev
24 - libffi-dev
25 - libvirt-dev
26 - python-dev
27 - python-pip
28 - python-virtualenv
29 #- python-psycopg2
30 - pkg-config
31 - vlan
32 - bridge-utils
33 - ebtables
34
35bootcmd:
36 # Enable root access
37 - sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
38 - service sshd restart
39output:
40 all: '| tee -a /var/log/cloud-init-output.log /dev/tty0'
41
42runcmd:
43 # Create swap
44 - fallocate -l 16G /swapfile
45 - chmod 600 /swapfile
46 - mkswap /swapfile
47 - swapon /swapfile
48 - echo "/swapfile none swap defaults 0 0" >> /etc/fstab
49 - find /etc/network/interfaces.d/ -type f -delete
50 - kill $(pidof /sbin/dhclient) || /bin/true
51 - ip a flush dev ens3
52 - rm -f /var/run/network/ifstate.ens3
53 - ip route delete default || /bin/true
54 - ifup ens3
55 - ip route add 10.167.11.0/24 via 172.16.162.67
56
57write_files:
58 - path: /etc/default/grub.d/97-enable-grub-menu.cfg
59 content: |
60 GRUB_RECORDFAIL_TIMEOUT=30
61 GRUB_TIMEOUT=3
62 GRUB_TIMEOUT_STYLE=menu
63
64 - path: /etc/network/interfaces
65 content: |
66 auto ens3
67 iface ens3 inet static
68 address $management_static_ip
69 netmask 255.255.255.192
70 gateway $management_gw
71 dns-nameservers $dnsaddress
72 up /sbin/ip ip route add 10.167.11.0/24 via 172.16.162.67
73
74 - path: /etc/bash_completion.d/fuel_devops30_activate
75 content: |
76 source /home/jenkins/fuel-devops30/bin/activate