Dev-in-a-Box
Minimal evaluation site with no compute services
Intro
To get familiar with the setup procedures for chi-in-a-box, or to develop services, you can follow this (very) minimal setup guide.
Note: This doesn't include support for TLS, or for communication outside of the single controller node. Services will be accessed via SSH tunnel or similar method.
Prerequisites:
Baremetal or Virtual Machine with 8 cores, 16gb ram, 80gb disk. This is roughly double the minimum for just control-plane services, as we will also be using these resources to host "virtual" baremetal nodes.
You must have a user account on the machine with passwordless sudo.
If launching a VM on Chameleon to host this, follow the following steps.
Launch an instance on KVM flavor: m1.xlarge image: CC-Ubuntu20.04 network: sharednet1
Attach a floating IP
Allow SSH via the floating IP (by applying the appropriate security group)
SSH into the node as cc@floating-ip
Installation
Prepare a working directory. We use
/opt
by convention. It must be writable by your current user.Clone the chi-in-a-box repo, install, and initialize your site-configuration
export an env var so you don't need to type "--site" for the remaining commands
Create some veth-pairs to act as "dummy" network interfaces.
External API interface
Internal API interface
Neutron Provider Network interfaces
We also want to make sure these intefaces aren't filtered by any firewalls. If you're using firewalld, then the following commands will do it:
Here,
ens3
is our external facing interface, so we don't want to keep it firewalled for safety, but open up everything else.In your site-config, replace defaults.yml with the one for dev-in-a-box
Bootstrap the controller node, this will install apt packages, configure Docker, and modify /etc/hosts
Run prechecks to ensure common issues are avoided.
this will probably yell about nscd.service. If so, run the following, then rerun prechecks.
At this point, we should be ready to "deploy".
Deploy is a composite action, executing the following sub-actions:
pull
: download relevant docker container images.Deploy will not pull newer images if one is in the cache already. You can execute
pull
directly if you need to explicitly pull a newer version.genconfig
: template and copy config files into /etc/kolla, but don't restart services to apply yetThis will combine the upstream defaults, contents of
chi-in-a-box
, and yoursite-config
, and template config files into/etc/kolla/<service_name>
. If you've added additional configuration, this step can warn you about invalid or missing config values, before actually modifying any running containers. Even if the step passes, you may want to inspect files under/etc/kolla/
to make sure they match your expectations.deploy-containers
: check and if necessary update running containers. This can be run separately if you want to make sure containers are running, but explicitly don't want to touch the templated configuration, for example if you've made edits to your site config, or temporary changes directly in /etc/kolla.
If all the steps so far have passed, all the core services should now be running! However, this isn't everything needed for a useful cloud.
post-deploy
consists of all the steps that require a functioning control plane. These include:Creating default networks
Creating compute "flavors"
Uploading default disk images for users to use
Installing various hammers and other utility services/cron-jobs. To run this step, execute:
Now, we'll create some "virtual" baremetal nodes, used to test out the site. These are just VMs run with libvirt, but are configured via IPMI and pxe network booted like a baremetal node, so we can exercise Ironic. The following playbook will install and configure the
tenks
utility to accomplish this. At the end of the invocation, it will print out some commands for you to run yourself to finish the setup.
Run the commands to bring up tenks. They will look something like the following, but may vary if you've changed your site-config from what's included here.
Once it's finished, we'll need to add an IP address to the bridge it attached for the ironic-provisioning network.
At this point, it should all be up and running! Try out one of the "baremetal nodes"
openstack baremetal node list
let's trigger an inspection.
to see what's happening on the controller:
once you see a line like
Successfully set node 44d0ac06-77d6-4444-93ce-7c8db5b54fff power state to power on by power on.
this means that the VM has been successfully "powered on".
to watch the machine's "serial console", execute:
Note: to exit this shell, press
ctrl+]
Download some real images to use! To avoid downloading "all" the images, we'll manually invoke the chameleon image download tool.
After a little while, you'll start seeing images like
CC-Ubuntu22.04
in the output ofopenstack image list
Lets launch a real instance. NOTE!: At this point, we've configured the node in ironic, but NOT in blazar, so we can launch instances without a reservation.
Our node should have finished inspection, so we'll need to move it from
manageable
back toavailable
Now that it's "available", we can launch a server on it.
If you access the console again via
sudo virsh console tk0
, you should see the image get written to disk, then the VM reboot into the final image.
Access your site! You can access it by the following methods:
All services are listening on the haproxy VIP on "ext_api_veth" interface, so you need a way to get to 192.168.100.0/24. We recommend using
sshuttle
on your local machine, invoked as:sshuttle -r cc@<floating_ip_address> 192.168.100.0/24
HAProxy and thus Horizon are listening on 192.168.100.254:80, which you can access after starting sshuttle. The username is
admin
, and the password can be viewed by running the following command:You can use the Openstack CLI or API directly. The CLI tools are pre-installed in the chi-in-a-box virtualenv, and the admin credentials in an
admin-openrc
file in your site-config directory. Access the tools as follows:
Last updated