By Paul Dixon
Once you’ve booted a new CoreOS host on Digital Ocean, how can you update the cloud-config?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
@bgrayburn you can update ssh keys without doing anything crazy: https://github.com/coreos/init/blob/master/bin/update-ssh-keys
I have a script that I use to push them out across my fleet:
$ cat fleetctl-inject-ssh.sh
#!/bin/bash -x
# Usage:
# cat public.key | fleetctl-inject-ssh.sh keyname
name=$1
if [ -z $name ]; then
echo "Provide a name for the injected SSH key"
exit 1
fi
shift 1
pubkey=$(cat)
for machine in $(fleetctl -strict-host-key-checking=false $@ list-machines --no-legend --full | awk '{ print $1;}'); do
fleetctl -strict-host-key-checking=false $@ ssh $machine "echo '${pubkey}' | update-ssh-keys -a $name -n"
done
so to run you could do something like:
echo 'THE_CONTENTS_OF_PUBKEY' | ./fleetctl-inject-ssh.sh <SOME_INTELLIGENT_NAME_FOR_KEY>
or
cat <PUBKEY> | ./fleetctl-inject-ssh.sh <SOME_INTELLIGENT_NAME_FOR_KEY>
You can find the cloud-config in :
/var/lib/coreos-install/user_data for baremetal/var/lib/coreos-vagrant/vagrant-user-data for vagrantupdate it, reboot, if no error, the new configuration should be done. I don’t know if it’s the good way but it seems to work.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
