Create a brand new ed25519 key pair
ssh-keygen -o -a 100 -t ed25519
Get the pub key and put the result in your lxd default profile
cat ~/.ssh/ed25519.pub
lxc profile edit default
Create a brand new ed25519 key pair
ssh-keygen -o -a 100 -t ed25519
Get the pub key and put the result in your lxd default profile
cat ~/.ssh/ed25519.pub
lxc profile edit default
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.
This is intended for copying/pasting as the first comment to all Gist entries I create. It's unfortunate that GitHub doesn't support notifying creators and participants in the feedback process for Gists, but this is at least something I can do to let potential viewers know that I'm not intentionally ignoring them.
As of the time this Gist entry was created, GitHub does not support notifications for comments for mentions to Gist entries (see isaacs/github#21 for details). Please contact me via Twitter or file an issue in the deoren/leave-feedback repo (created for that very purpose) if you wish to receive a response for your feedback. Thank you in advance!
Summarized from https://stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/.
Interestingly, the LXD command line client is named.... lxc
!
lxc image list ubuntu: # ubuntu: is officially supported image source
lxc image list images: # images: is an unsupported source
lxc image alias list images: # lists user-friendly names
# create the network if network does not exist | |
docker network list | grep -q "wordpress_net" || \ | |
docker network create "wordpress_net" | |
# create volumes | |
docker volume create -d local --name "db_data" | |
# start mysql database | |
docker run -d \ | |
-v db_data:/var/lib/mysql:rw \ |
--- | |
- hosts: localhost | |
gather_facts: no | |
vars: | |
docker_volume: db_data | |
docker_network: ansible_net | |
db_name: db | |
wp_name: wordpress | |
wp_host_port: 8000 | |
wp_container_port: 80 |