Tatyana Leontovich | b054b69 | 2019-06-03 13:19:46 +0300 | [diff] [blame] | 1 | #cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html |
| 2 | |
| 3 | ssh_pwauth: True |
| 4 | users: |
| 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 | |
| 14 | disable_root: false |
| 15 | chpasswd: |
| 16 | list: | |
| 17 | root:r00tme |
| 18 | jenkins:qalab |
| 19 | expire: False |
| 20 | |
| 21 | packages: |
| 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 | |
| 35 | bootcmd: |
| 36 | # Enable root access |
| 37 | - sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin yes/' /etc/ssh/sshd_config |
| 38 | - service sshd restart |
| 39 | output: |
| 40 | all: '| tee -a /var/log/cloud-init-output.log /dev/tty0' |
| 41 | |
| 42 | runcmd: |
| 43 | # Create swap |
PGlazov | f1060cd | 2021-10-15 04:47:29 +0400 | [diff] [blame^] | 44 | - fallocate -l 2G /swapfile |
Tatyana Leontovich | b054b69 | 2019-06-03 13:19:46 +0300 | [diff] [blame] | 45 | - chmod 600 /swapfile |
| 46 | - mkswap /swapfile |
| 47 | - swapon /swapfile |
| 48 | - echo "/swapfile none swap defaults 0 0" >> /etc/fstab |
| 49 | |
| 50 | write_files: |
| 51 | - path: /etc/default/grub.d/97-enable-grub-menu.cfg |
| 52 | content: | |
| 53 | GRUB_RECORDFAIL_TIMEOUT=30 |
| 54 | GRUB_TIMEOUT=3 |
| 55 | GRUB_TIMEOUT_STYLE=menu |
| 56 | |
| 57 | - path: /etc/network/interfaces |
| 58 | content: | |
| 59 | auto ens3 |
| 60 | iface ens3 inet dhcp |
| 61 | |
| 62 | - path: /etc/bash_completion.d/fuel_devops30_activate |
| 63 | content: | |
| 64 | source /home/jenkins/fuel-devops30/bin/activate |