jeff revised this gist 1 year ago. Go to revision
1 file changed, 1 deletion
README.md (file deleted)
| @@ -1 +0,0 @@ | |||
| 1 | - | This works with XCP-ng and the [Ubuntu Cloud Images](https://cloud-images.ubuntu.com/noble/current/). | |
jeff revised this gist 1 year ago. Go to revision
1 file changed, 7 insertions
network.yaml(file created)
| @@ -0,0 +1,7 @@ | |||
| 1 | + | network: | |
| 2 | + | version: 1 | |
| 3 | + | config: | |
| 4 | + | - type: physical | |
| 5 | + | name: enX0 | |
| 6 | + | subnets: | |
| 7 | + | - type: dhcp | |
jeff revised this gist 1 year ago. Go to revision
1 file changed, 1 insertion
README.md(file created)
| @@ -0,0 +1 @@ | |||
| 1 | + | This works with XCP-ng and the [Ubuntu Cloud Images](https://cloud-images.ubuntu.com/noble/current/). | |
jeff revised this gist 1 year ago. Go to revision
1 file changed, 45 insertions
cloud-config.yaml(file created)
| @@ -0,0 +1,45 @@ | |||
| 1 | + | #cloud-config | |
| 2 | + | ||
| 3 | + | hostname: {name} | |
| 4 | + | ||
| 5 | + | # add host to the /etc/hosts | |
| 6 | + | manage_etc_hosts: true | |
| 7 | + | ||
| 8 | + | # don't disable the root user | |
| 9 | + | disable_root: false | |
| 10 | + | ||
| 11 | + | users: | |
| 12 | + | # create the user for me | |
| 13 | + | - name: myuser | |
| 14 | + | # I like to sudo! | |
| 15 | + | groups: sudo | |
| 16 | + | sudo: ALL=(ALL) NOPASSWD:ALL | |
| 17 | + | lock_passwd: false | |
| 18 | + | # set user password. Can be generated with mkpasswd (in whois package) | |
| 19 | + | # mkpasswd --method=SHA-512 | |
| 20 | + | passwd: $6$pwewv | |
| 21 | + | ssh_authorized_keys: | |
| 22 | + | - ssh-rsa MY_SSH_KEY_GOES_HERE... | |
| 23 | + | shell: /bin/bash | |
| 24 | + | # update SSH key for root (probably not a best practice to allow this but...) | |
| 25 | + | - name: root | |
| 26 | + | ssh_authorized_keys: | |
| 27 | + | - ssh-rsa MY_SSH_KEY_GOES_HERE... | |
| 28 | + | ||
| 29 | + | # Update APT repo and upgrade packages | |
| 30 | + | package_update: true | |
| 31 | + | package_upgrade: true | |
| 32 | + | ||
| 33 | + | # Install a few packages | |
| 34 | + | packages: | |
| 35 | + | - htop | |
| 36 | + | - nano | |
| 37 | + | ||
| 38 | + | locale: en_US.UTF-8 | |
| 39 | + | timezone: America/Edmonton | |
| 40 | + | runcmd: | |
| 41 | + | # Download and install XE Guest Utils from Github Repo | |
| 42 | + | - curl -sL https://github.com/xenserver/xe-guest-utilities/releases/download/v8.4.0/xe-guest-utilities_8.4.0-1_amd64.deb -o /tmp/xe-guest-utilities.deb && sudo dpkg -i /tmp/xe-guest-utilities.deb | |
| 43 | + | ||
| 44 | + | # Disable password-based authentication for SSH | |
| 45 | + | ssh_pwauth: False | |