From 5699f2db83f4cdd2a881a6e8cd82d7daac1759e1 Mon Sep 17 00:00:00 2001 From: Tim Pepper Date: Wed, 3 Aug 2016 14:07:49 -0700 Subject: [PATCH 1/6] ciao: simplify cnci documentation An upstream page has the maintained/preferred workflow for setting up a CNCI. Rather than trying to maintain a duplicate of this, lets minimally describe what's needed and refer to the upstream documentation point. Signed-off-by: Tim Pepper --- source/ciao-cluster-setup.rst | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/source/ciao-cluster-setup.rst b/source/ciao-cluster-setup.rst index 6ea4933c..3abf529a 100644 --- a/source/ciao-cluster-setup.rst +++ b/source/ciao-cluster-setup.rst @@ -270,14 +270,10 @@ correct roles and names as previously described. Pre-populate the CNCI image cache ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This section describes how to generate a CNCI image from a vanilla -Clear Cloud qcow2 image:: - $ cd /var/lib/ciao/images - $ curl -O https://download.clearlinux.org/demos/ciao/clear-7470-ciao-networking.img.xz - $ xz -T0 --decompress clear-7470-ciao-networking.img.xz - $ ln -s clear-7470-ciao-networking.img 4e16e743-265a-4bf2-9fd1-57ada0b28904 - $ $GOPATH/src/github.com/01org/ciao/networking/cnci_agent/scripts/update_cnci_cloud_image.sh /var/lib/ciao/images/clear-7470-ciao-networking.img /etc/pki/ciao/ +You need to generate a CNCI image with your cluster TLS keys inside +it, based on the latest base image published by ClearLinux. This is +accomplished through scripting as described in `ciao-cnci-agent`_. Start the network node launcher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -548,3 +544,4 @@ testing. .. _mailing list: https://lists.clearlinux.org/mailman/listinfo/ciao-devel .. _ciao-cli: https://github.com/01org/ciao/tree/master/ciao-cli .. _ciao-webui: https://github.com/01org/ciao-webui +.. _ciao-cnci-agent: https://github.com/01org/ciao/tree/master/networking/ciao-cnci-agent/scripts From 893c595675ccec26a5c83291a1b5384c435150fc Mon Sep 17 00:00:00 2001 From: Tim Pepper Date: Wed, 3 Aug 2016 14:11:50 -0700 Subject: [PATCH 2/6] ciao: note placement of image after creation The unique thing here versus the upstream documentation is we're describing a cluster setup where the image, once created, needs to land in a very specific location. Signed-off-by: Tim Pepper --- source/ciao-cluster-setup.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/ciao-cluster-setup.rst b/source/ciao-cluster-setup.rst index 3abf529a..a22b47c0 100644 --- a/source/ciao-cluster-setup.rst +++ b/source/ciao-cluster-setup.rst @@ -275,6 +275,12 @@ You need to generate a CNCI image with your cluster TLS keys inside it, based on the latest base image published by ClearLinux. This is accomplished through scripting as described in `ciao-cnci-agent`_. +Once created, move your image to the cache on your network node and +symlink it:: + + $ mv clear-7470-ciao-networking.img /var/lib/ciao/images + $ ln -s /var/lib/ciao/images/clear-${VERSION}-ciao-networking.img /var/lib/ciao/images/4e16e743-265a-4bf2-9fd1-57ada0b28904 + Start the network node launcher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From e6c27bbdc26dc2708c998a7c323fcb42fda53149 Mon Sep 17 00:00:00 2001 From: Tim Pepper Date: Wed, 3 Aug 2016 14:19:54 -0700 Subject: [PATCH 3/6] ciao: simplify CA setup docu for ClearLinux ClearLinux has simplified their mechanism for CA trust. This nicely trims a lot of complexity from our ciao documentation. Signed-off-by: Tim Pepper --- source/ciao-cluster-setup.rst | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/source/ciao-cluster-setup.rst b/source/ciao-cluster-setup.rst index a22b47c0..d5ec556e 100644 --- a/source/ciao-cluster-setup.rst +++ b/source/ciao-cluster-setup.rst @@ -329,16 +329,9 @@ this certificate needs to be installed in the control node and be part of the control node CA root. On Clear Linux OS for Intel Architecture, this is accomplished with:: - $ sudo mkdir /etc/ca-certs - $ sudo cp cacert.pem /etc/ca-certs - $ sudo c_hash /etc/ca-certs/cacert.pem - -Note the generated hash from the prior command and use it in the next commands:: - - $ sudo ln -s /etc/ca-certs/cacert.pem /etc/ca-certs/ - $ sudo mkdir /etc/ssl - $ sudo ln -s /etc/ca-certs/ /etc/ssl/certs - $ sudo ln -s /etc/ca-certs/cacert.pem /usr/share/ca-certs/ + $ sudo mkdir /etc/ssl/certs + $ sudo cp cacert.pem /etc/ssl/certs + $ sudo trust-certs You will need to tell the controller where the keystone service is located and pass the ciao service username and password to it. DO NOT USE From 92b0ce36108c2c6510a7c6f742b0ca6e3a68c3b4 Mon Sep 17 00:00:00 2001 From: Tim Pepper Date: Wed, 3 Aug 2016 14:26:31 -0700 Subject: [PATCH 4/6] ciao: use updated ciao-cli arguments Quite some time back the command line was modified without reverse compatibility, and the docu here has bit rotted. Signed-off-by: Tim Pepper --- source/ciao-cluster-setup.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/source/ciao-cluster-setup.rst b/source/ciao-cluster-setup.rst index d5ec556e..b344aaa3 100644 --- a/source/ciao-cluster-setup.rst +++ b/source/ciao-cluster-setup.rst @@ -346,19 +346,20 @@ Optionally add ``-logtostderr`` (more verbose with also ``-v=2``) to get console logging output. Use the `ciao-cli`_ command line tool to verify that your cluster is -now up and running:: +now up and running (NOTE: you should have exported CIAO_* environment +variables as per `ciao-cli`_ documentation):: - $ ciao-cli -username admin -password -cluster-status - $ ciao-cli -username admin -password -list-cns - $ ciao-cli -username admin -password -list-cncis + $ ciao-cli node status + $ ciao-cli node list -compute + $ ciao-cli node list -cnci -``-cluster-status`` shows the number of nodes in your cluster, and the +``node status`` shows the number of nodes in your cluster, and the status of each. -``-list-cns`` displays a more detailed view (number of instances per node, +``node list -compute`` displays a more detailed view (number of instances per node, available resources per node, etc.). -``-list-cncis`` provides information about the current CNCI VMs, and their statuses. +``node list -cnci`` provides information about the current CNCI VMs, and their statuses. Interacting with your cluster ============================= From 0fc7807fb558439c9b23d0752420d60d31ea3903 Mon Sep 17 00:00:00 2001 From: Tim Pepper Date: Wed, 3 Aug 2016 16:03:15 -0700 Subject: [PATCH 5/6] ciao: more ciao-cli syntax changes Given my prior observation of outdated ciao-cli invocations, I did a read through of ciao-cli related bits and found a number of additional areas needing updated. Signed-off-by: Tim Pepper --- source/ciao-cluster-setup.rst | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/source/ciao-cluster-setup.rst b/source/ciao-cluster-setup.rst index b344aaa3..1ad39776 100644 --- a/source/ciao-cluster-setup.rst +++ b/source/ciao-cluster-setup.rst @@ -384,6 +384,7 @@ specific environment variables: * ``CIAO_COMPUTEPORT`` exports the ciao compute alternative port * ``CIAO_USERNAME`` exports the ciao username * ``CIAO_PASSWORD`` export the ciao password for ``CIAO_USERNAME`` +* ``CIAO_TENANT_NAME`` export the ciao tenant name for the user For example:: @@ -393,6 +394,7 @@ For example:: export CIAO_IDENTITY=https://ciao-identity.intel.com:35357 export CIAO_USERNAME=user export CIAO_PASSWORD=ciaouser + export CIAO_TENANT_NAME=demo $ source ciao-cli-example.sh @@ -406,6 +408,7 @@ variables and override them: * ``CIAO_COMPUTEPORT`` can be defined by the ``--computeport`` option * ``CIAO_USERNAME`` can be defined by the ``--username`` option * ``CIAO_PASSWORD`` can be defined by the ``--password`` option +* ``CIAO_TENANT_NAME`` can be defined by the ``--tenant-name`` option Start a workload @@ -415,24 +418,24 @@ As a valid user, the `ciao-cli`_ tool allows you to start a workload. First, you may want to know which workloads are available:: - $ ciao-cli -list-workloads + $ ciao-cli workload list Then you can launch one or more workloads:: - $ ciao-cli -launch-instances -workload -instances + $ ciao-cli instance add -workload -instances And you can monitor all your instances statuses (``pending`` or ``running``):: - $ ciao-cli -list-instances + $ ciao-cli instance list Performance data can be obtained (optionally) by adding a specific label to all your instances:: - $ ciao-cli -launch-instances -instance-label -workload -instances + $ ciao-cli instance add -label -workload -instances And eventually fetch the performance data:: - $ ciao-cli -dump-label + $ ciao-cli trace show You will also see activity related to this launch across your cluster components if you have consoles open and logging to standard output as @@ -461,7 +464,7 @@ Reset your cluster First you should delete all instances with the `ciao-cli`_ command line tool:: - $ ciao-cli -delete-instance -all-instances + $ ciao-cli instance delete -all On your scheduler node, run the following command:: From 7eabc505fabe1abc0be9b9e55fb67f17f61dfb68 Mon Sep 17 00:00:00 2001 From: Tim Pepper Date: Thu, 4 Aug 2016 09:04:30 -0700 Subject: [PATCH 6/6] ciao: add openstack/keystone demo project creation command A "demo" project is needed for the rest of the demostration commands shown. Something/somebody was pre-creating this automagically in our dev environment internally, but it needs done manually normally and that needs documented. Signed-off-by: Tim Pepper --- source/ciao-cluster-setup.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/source/ciao-cluster-setup.rst b/source/ciao-cluster-setup.rst index 1ad39776..0b2f6ade 100644 --- a/source/ciao-cluster-setup.rst +++ b/source/ciao-cluster-setup.rst @@ -158,6 +158,7 @@ We need a few configuration points. For example::: $ openstack service create --name ciao compute $ openstack user create --password hello csr $ openstack role add --project service --user csr admin + $ openstack project create --description "Demostration Tenant Project" demo $ openstack user create --password giveciaoatry demo $ openstack role add --project demo --user demo user