mirror of
https://github.com/clearlinux/clear-linux-documentation.git
synced 2026-08-24 08:48:15 +00:00
Merge branch 'ciao_deploy_update' into 'master'
Ciao deploy update Update *ciao-deploy.rst* documentation with current examples in https://github.com/clearlinux/clear-config-management/tree/master/examples/ciao Changes: * updated the group_vars/all file with newest example * deployment added a compute node * Added the `--private-key=<ssh_key>` instruction when running the playbooks Please merge once @onmunoz , @albertom , @lmaciasm , @eocardon and @carlosag comment it's all OK with the changes See merge request !81
This commit is contained in:
+46
-52
@@ -14,9 +14,9 @@ For more information visit https://clearlinux.org/ciao.
|
||||
|
||||
Environment
|
||||
===========
|
||||
For this example, we'll use a total of three nodes:
|
||||
For this example, we'll use a total of four nodes:
|
||||
- A `controller <https://github.com/01org/ciao/tree/master/ciao-controller>`_ node which will be used to communicate with Keystone.
|
||||
- A `compute node <https://github.com/01org/ciao/tree/master/ciao-launcher>`_ which will spawn the VM's and containers.
|
||||
- Two `compute nodes <https://github.com/01org/ciao/tree/master/ciao-launcher>`_ which will spawn the VM's and containers.
|
||||
|
||||
- A `network node <https://github.com/01org/ciao/tree/master/ciao-launcher>`_ which will handle the netowrking for the workloads.
|
||||
|
||||
@@ -88,63 +88,57 @@ they will serve. For this example it should look like this::
|
||||
ciao-network.example.com
|
||||
|
||||
[ciao_compute]
|
||||
ciao-compute.example.com
|
||||
ciao-compute1.example.com
|
||||
ciao-compute2.example.com
|
||||
|
||||
This ``groups_var/all`` file contains variables that will applied for your ciao setup.
|
||||
The mandatory variables are already there; be sure to change the values accordingly to
|
||||
fit your environment. It should look something like this::
|
||||
|
||||
---
|
||||
# Vars required for mariadb and os-common
|
||||
# https://github.com/clearlinux/clear-config-management/tree/master/roles/mariadb
|
||||
# https://github.com/clearlinux/clear-config-management/tree/master/roles/os-common
|
||||
database_root_password: secret
|
||||
|
||||
glance_fqdn: ciao-controller.example.com
|
||||
glance_user_password: secret
|
||||
glance_database_password: secret
|
||||
|
||||
ciao_controller_ip: 172.17.0.6
|
||||
ciao_mgmt_subnet: 172.17.0.0/24
|
||||
ciao_compute_subnet: "{{ciao_mgmt_subnet}}"
|
||||
ciao_csr_password: secret
|
||||
ciao_ssh_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDhn1BIdDv2Rpx6qhYt9Z+3eOg1JIGyt6E0as3J02ymXsN2Zc4s+XXcj0tkifgZmKmm1H4dt1bVMcWcODl8qP6hjRVjSdo7KW8vXYkQv7eXNnhO+4vCttI6UsaB8LDdv6/TRGaRjj66shAC70ySH77/COAHnzTJdSWvzEVBs4hO8rii6MmyDduQhZM14JpCFP2zkZ1ICNcPjf60a4vi2GiW8PWlJwrUuzsa5qfWCExA98UD04lg+mwFCYBfgQeQcXKN+eQqV6XQ8ujE/++pLSjsSSK1/cXCkWtMGJGTgjY5zH20tfIbJPnBeOIlYvWjJDNFvCC5b9UspTLlhnggGhZ root@ciao-controller.example.com
|
||||
ciao_admin_email: admin@ciao-controller.example.com
|
||||
ciao_cert_organization: Example, Inc.
|
||||
|
||||
# Vars required for os-common
|
||||
# https://github.com/clearlinux/clear-config-management/tree/master/roles/os-common
|
||||
keystone_fqdn: ciao-controller.example.com
|
||||
keystone_root_domain: ciao-controller.example.com
|
||||
keystone_p12password: secret
|
||||
keystone_database_password: secret
|
||||
keystone_admin_password: secret
|
||||
keystone_services:
|
||||
- service_name: "ciao"
|
||||
service_type: "compute"
|
||||
keystone_projects:
|
||||
- project_name: "demo"
|
||||
keystone_users:
|
||||
- user_name: "csr"
|
||||
password: "{{ciao_csr_password}}"
|
||||
project_name: "admin"
|
||||
- user_name: "demo"
|
||||
password: "secret"
|
||||
project_name: "demo"
|
||||
keystone_roles:
|
||||
- demo
|
||||
keystone_user_roles:
|
||||
- user_name: csr
|
||||
project_name: service
|
||||
role_name: admin
|
||||
- user_name: demo
|
||||
project_name: demo
|
||||
role_name: demo
|
||||
|
||||
# Vars required for os-keystone
|
||||
# https://github.com/clearlinux/clear-config-management/tree/master/roles/os-keystone
|
||||
keystone_database_password: secret
|
||||
keystone_root_domain: example.com
|
||||
keystone_p12password: secret
|
||||
|
||||
# Vars required for ciao-common
|
||||
# https://github.com/clearlinux/clear-config-management/tree/master/roles/ciao-common
|
||||
ciao_controller_fqdn: ciao-controller.example.com
|
||||
|
||||
# Vars required for ciao-controller
|
||||
# https://github.com/clearlinux/clear-config-management/tree/master/roles/ciao-controller
|
||||
ciao_service_user: csr
|
||||
ciao_service_password: secret
|
||||
ciao_admin_email: admin@example.com
|
||||
ciao_cert_organization: Example, Inc.
|
||||
ciao_guest_user: demouser
|
||||
ciao_guest_key: ~/.ssh/guest_vms.pub
|
||||
|
||||
|
||||
A full list of available variables can be found under
|
||||
``/usr/share/ansible/roles/<role>/defaults/main.yml``
|
||||
The `ciao_guest_key` is the key to be used to connect to the VMs created by ciao,
|
||||
you can use the `ssh-keygen` command to create one as explained in the prerequisites
|
||||
section.
|
||||
|
||||
A full list of available variables can be found in the ciao-* roles at
|
||||
https://github.com/clearlinux/clear-config-management/tree/master/roles
|
||||
|
||||
Run the playbook
|
||||
================
|
||||
Once you have your variables and hosts file configured, the deployment can be fired
|
||||
with the following command::
|
||||
|
||||
# ansible-playbook -i hosts ciao.yml
|
||||
# ansible-playbook -i hosts ciao.yml --private-key=<ssh_key>
|
||||
|
||||
Verify
|
||||
======
|
||||
@@ -154,27 +148,27 @@ Change the username, password, controller and identity values to match
|
||||
your setup as specified in the ``groups_var/all`` file::
|
||||
|
||||
# ciao-cli -identity=https://ciao-controller.example.com:35357 -username admin -password secret -controller=ciao-controller.example.com node status
|
||||
Total Nodes 2
|
||||
Ready 2
|
||||
Full 0
|
||||
Total Nodes 3
|
||||
Ready 0
|
||||
Full 3
|
||||
Offline 0
|
||||
Maintenance 0
|
||||
|
||||
You could also create a ciaorc file that contains the following environment
|
||||
variables::
|
||||
You could also take a look at the ciaorc file created (in `~/ciaorc`)
|
||||
that contains the following environment variables::
|
||||
|
||||
# cat ciaorc
|
||||
export CIAO_CONTROLLER=ciao-controller.example.com
|
||||
export CIAO_IDENTITY=https://ciao-controller.example.com:35357
|
||||
export CIAO_USERNAME=admin
|
||||
export CIAO_PASSWORD=secure
|
||||
export CIAO_USERNAME=csr
|
||||
export CIAO_PASSWORD=secret
|
||||
|
||||
then you could verify with the following command::
|
||||
|
||||
# source ciaorc
|
||||
# ciao-cli node status
|
||||
Total Nodes 2
|
||||
Ready 2
|
||||
Full 0
|
||||
Total Nodes 3
|
||||
Ready 0
|
||||
Full 3
|
||||
Offline 0
|
||||
Maintenance 0
|
||||
|
||||
Reference in New Issue
Block a user