Setting up a development environment with devstack¶
This page describes how to set up a working development environment that can be used in deploying qinling on latest releases of Ubuntu. These instructions assume you are already familiar with git. Refer to Getting the code for additional information.
Following these instructions will allow you to have a fully functional qinling environment using the devstack project (a shell script to build complete OpenStack development environments) on Ubuntu 16.04.
Configuring devstack with Qinling¶
Qinling can be enabled in devstack by using the plug-in based interface it offers.
Note
The following steps have been fully verified only on Ubuntu 16.04.
Start by cloning the devstack repository using a non-root user:
git clone https://github.com/openstack-dev/devstack
Change to devstack directory:
cd devstack/
Create the local.conf
file with the following minimal devstack
configuration:
[[local|localrc]]
RECLONE=True
enable_plugin qinling https://github.com/openstack/qinling
LIBS_FROM_GIT=python-qinlingclient
DATABASE_PASSWORD=password
ADMIN_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=password
RABBIT_PASSWORD=password
LOGFILE=$DEST/logs/stack.sh.log
LOG_COLOR=False
LOGDAYS=1
ENABLED_SERVICES=rabbit,mysql,key
Here are several things you could customize:
For multiple network cards, you need to specify the kubernetes API server’s advertise address manually.
export EXTRA_KUBEADM_INIT_OPTS="--apiserver-advertise-address <default-host-ip>"
Devstack will set up a new kubernetes cluster and re-use etcd service inside the cluster for Qinling services, which means you don’t need to add etcd to the enabled services list in the
local.conf
file.If you already have an existing kubernetes/etcd cluster, add
QINLING_INSTALL_K8S=False
to thelocal.conf
file. You need to manually config Qinling services after devstack completes, go to Config Qinling with existing Kubernetes cluster for more configuration details.If you want to interact with Qinling in Horizon dashboard, add the following line to the
local.conf
file.enable_plugin qinling-dashboard https://opendev.org/openstack/qinling-dashboard
Running devstack¶
Run the stack.sh
script:
./stack.sh
After it completes, verify qinling service is installed properly:
$ source openrc admin admin
$ openstack service list
+----------------------------------+----------+-----------------+
| ID | Name | Type |
+----------------------------------+----------+-----------------+
| 59be2ecc8b8d4e61af184ea3495bf207 | qinling | function-engine |
| e5891d41a929402384ef00ce7135a16d | keystone | identity |
+----------------------------------+----------+-----------------+
$ openstack runtime list --print-empty
+----+------+-------+--------+-------------+------------+------------+------------+
| Id | Name | Image | Status | Description | Project_id | Created_at | Updated_at |
+----+------+-------+--------+-------------+------------+------------+------------+
+----+------+-------+--------+-------------+------------+------------+------------+
Kubernetes Integration¶
By default, Qinling uses Kubernetes as its orchestrator backend, so a k8s all-in-one environment (and some other related tools, e.g. kubectl) is also set up during devstack installation.
Qinling devstack script uses kubeadm
for Kubernetes installation, refer to tools/gate/kubeadm/setup_gate.sh
for
more detailed information about Qinling devstack installation.