All documents
User data or Cloud-init automatically configures Bare Metal GPU servers after bootup. These scripts are generally used for the initial configuration of a server and run on the first boot. Deploying a server with user data allows you to run arbitrary commands and change several aspects of the server during provisioning.
Here are a few examples of what you can do with user data scripts:
#cloud-config
users:
- name: cloud_user
ssh_authorized_keys:
- ssh-rsa AAAAB3Nz... user@domain
sudo: "ALL=(ALL) NOPASSWD:ALL"
groups: sudo
shell: /bin/bash
packages:
- git
- htop
What this script does:
ssh -i /.ssh/id_rsa maas_user@10.192.226.195
You can then test it further by running htop and trying out some git commands.
#cloud-config
users:
- default
- name: user1
ssh_authorized_keys:
- ssh-rsa AAAAB3Nz... user1@domain
- name: user2
ssh_authorized_keys:
- ssh-rsa AAAAB3Nz... user2@domain
What this script does:
#cloud-config
packages:
- docker.io
runcmd:
- systemctl enable docker
- systemctl start docker
What this script does:
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checbox-analytics | 11 months | |
cookielawinfo-checbox-functional | 11 months | |
cookielawinfo-checbox-others | 11 months | |
cookielawinfo-checkbox-necessary | 11 months | |
cookielawinfo-checkbox-performance | 11 months | |
viewed_cookie_policy | 11 months |