Delete any of cnci_image.img.xz, cnci_image.img or .cnci_ready files
to let ansible rebuild the cnci image.
If the tree files mentioned above already exists. Skip the
image creation phase.
Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
Roles are invoked with become: yes in the playbook.
This change let all tasks run as root and adds
become: no only to the tasks that need to be run
as the local user.
Fixes#97
Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
- Define tasks attributes in the following order:
- name:
become:
connection:
module:
Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
ciao-cert now has a -dump parameter which gives information about
the certificates.
This change installs ciao-cert on all nodes with SSNTP certificates
as it is usefull to debug certificate issues.
Fixes#87
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
ClearLinux 10910 creates /etc/ssl/certs as a symlink
to /var/cache/ca-certs and Ubuntu already ships the
directory.
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
the `qemu-nbd` tool it's used to manipulate the cnci image, which
is already a raw image (not qcow as thought), so we can use
raw image manipulation, removing all the need of nbd manipulation
tools.
Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
Before this commit, all build tasks for the ciao-controller
role were perfomed as `connection: local`, this is handy
but not accurate (e.g: "Fetch ciao files" shouldn't be local).
This commit specifies which tasks in build should be
performed as local, instead of the whole build.yml playbook.
Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
This option is no longer configurable since there is no secure
way to pass this value to qemu cli other than looking for the
default path for the keyring file.
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
The playbooks were creating a ciaorc to authenticate the cli
with the ciao user.
The ciao user is reserved for ciao services authenticating into keystone
and should not be used in the cli to create instances.
This changes creates admin-openrc with credentials for the admin user
and demo-openrc with credentials for the demo user to be used by ciao-cli.
Fixes#46
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
- Allow the user to customize the location of GOPATH
- Remove -u option from go get command to pickup changes
made by developers that are not ready in the repository.
Fixes#40
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
Add a contribution notice on each role to direct users to
open issues and pull requests at github.com/clearlinux/clear-config-management
rather than github.com/clearlinux/ansible-role-<rolename>
Fixes#43
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
SOmetimes when behind a proxy, cnci and fedora images cannot be
downloaded because of certificate cannot be validated.
Fixes#45
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
When ciao_dev is set to true and there was an update in the code, ciao
sources is updated and binaries are recompiled and transfered to the nodes
but the service were not being restarted.
Fixes#42
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
add ceph_id and secret_path variables to specify the
cephx user id and its keyring file in the configuration file.
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
- Deployment of ciao has changed from installing everyghin in packages
to install keystone and ciao-webui from containers.
- ciao-laucher will detect the operating system and install the required
dependencies
- Support for Ubuntu 16.04 and Fedora 24 has been added.
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
These variables will setup access to ALL vm launched including
CNCI images.
This is a temporary solution for development/testing purposes
until a formal way to define per VM access from the user
perspective is available
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
This commit creates /var/lib/ciao/images/.cnci_ready file after
it has finished with the configuration of a cnci image.
If the file exists then the cnci image setup will be skipped.
This change prevents the playbook from creating and transfering the cnci
image each time is run and only does it when its necessary.
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
Tasks to retrieve and enable the controllers ca root certificate
where being marked as changed every time the playbooks runs
This commit properly handles the copy and enabling of the ca
certificate in both clearlinux and ubuntu.
Task Build CIAO from sources is always tagged as 'changed'
even when nothing has changed
This commit tags the task as unchanged when there is no change
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
When building CIAO from sources, gcc is required to compile
the following dependencies.
github.com/01org/ciao/vendor/github.com/vishvananda/netlink
github.com/01org/ciao/vendor/github.com/docker/docker/pkg/term
github.com/01org/ciao/vendor/github.com/mattn/go-sqlite3
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
There are some tasks that are marked as CHANGED even if they
did not change anything.
- os-keystone: Perform a Keystone DB sync
- os-keystone: bootstrap keystone
- os-glance: Perform a Glance DB sync
- os-glance: Retrieve CA certificate
- os-cinder: Retrieve CA certificate
- os-swift: Retrieve CA certificate
- ciao-controller: Get hash from cacert.pem
Fixes#22
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
* ciao: Install ciao from github sources
- Add a new variable ciao_dev to ciao-common
When set to True, it will build ciao from the master branch
and put the binaries in /usr/local/bin
When set to False (default) it will install ciao from the OS
packages
Fixes#21
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
* ciao: Add ciao_cleanup.yml playbook (#28)
- This playbook cleanups a ciao cluster
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
Rally needs a compute endpoint in order to run.
- Create ciao admin user in openstack by default
- Create ciao compute service in openstack by default
- Create ciao compute endpoint in openstack by default
- Remove optional variables in example playbook to create
the items above.
Fixes#14
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
- Update ciao example playbook with newer variables
- Remove glance from the example since it is not yet
supported by ciao.
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
- Change format for README.md files from rst to githubs markdown
- Document role variables in a table inside README.md files
- Document each variable in defaults/main.yml files
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
There are some places (like certificates) where the
controller hostname should be used.
This was achieved with groups['ciao_controller'][0] which worked
when the host file was defined as:
[ciao_controller]
controller.example.com
But if the IP is defined in the host file instead of the fqdn,
the ip was getting used instead of its fqdn.
- Replace {{ groups['ciao_controller'][0] }}
with {{ ciao_controller_fqdn }}
- Replace {{ groups['openstack_identity'][0] }}
with {{ keystone_fqdn }}
- Replace {{ groups['openstack_object_storage_controller'][0] }}
with {{ swift_fqdn }}
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
- Ansible best practices recomends a generous use of whitespaces
to improve readability.
- Variables are normally written as {{ varname }}
- Add spaces around jinja filters
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
- Task names on install.yml files where updated:
from: "Install <package-name> bundle"
to: "Install <bundle-name> bundle"
- Task names on install.yml files where updated:
from: "Run swupd verify"
to: "Verify <bundle-name> has been installed"
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
The latest ciao cnci image (at the time of this commit) is based
on clearlinux 8260 which contains an old version of cnci agent.
This commit fetchs the latest ciao-cnci-agent binary and its
assosiated service file and injects them into the cnci image
- Update clearlinux image url to 8740
- Update ciao cnci image url to 8260
- Inject ciao-cnci-agent into cnci image
- Inject ciao-cnci-agent.service into cnci image
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
Ciao configuration implements an API for ciao components
to fetch and store cluster configuration data from a
specific storage backend.
ciao-scheduler reads the configuration from the backend
and propagates it to other components through SSNTP
More detailed information can be found at:
https://github.com/01org/ciao/tree/master/configuration
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
- let cloud-init create a user named 'demouser' which
describes better the intent of the user and because
'ciao' is already taken by a system user
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
- ciao-common: add handler to reload systemd config files
- ciao-controller: add handler to restart controller service
- ciao-controller: add handler to restart scheduler service
- ciao-compute: add handler to restart compute service
- ciao-network: add handler to restart network service
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
- Move api certificates from /etc/nginx/ssl to a per-application directory
like /etc/keystone/ssl
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>