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>
Add a docker-ciao-webui.service systemd unit file to ensure
ciao-webui container starts after the host server is rebooted.
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
Add a docker-keystone.service systemd unit file to ensure
keystone containers starts after the host server is rebooted.
Fixes#85
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
ClearLinux uses docker-cor.service file by default when running
in baremetal (ClearContainers).
docker_service defaults to docker.service for fedora, ubuntu and
clearlinux with no /dev/kvm support.
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
When restarting ciao-launcher on the CN or NN it's important to keep the
qemu processes that they've started alive.
The default, KillMode=control-group, will result in all processes in
the control group being killed when the service is stopped. This will
include all the qemu processes created by ciao-launcher as they are
placed into the same cgroup by systemd.
Signed-off-by: Rob Bradford <robert.bradford@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>
* docker: docker service is not started in clearlinux
Docker service is usually started when docker is installed.
In ClearLinux, docker is not started when containers-basic
bundle is installed
This change enables and starts the docker service to ensure
it is usable after installation.
Fixes#75
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
* docker: Add name of distro to distro specific tasks
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>
Using $GOPATH as the value for gopath is not
so easily achievable because the GOPATH value
for the deployment machine does not get copied
automatically to other nodes.
Also setting a fact on one node does not set it
on other nodes.
The easiest way to share this value across the
different ciao roles is to set it as a variable
that can be overriden in groups_vars/all file or
via the cmdline with --extra-vars "gopath=$GOPATH"
Fixes: #57
Signed-off-by: Alberto Murillo <alberto.murillo.silva@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>
ciao creates systemd unit files to start ciao services.
In the case of ClearLinux, there is the possibility that
/etc/systemd/system has not been created yet. This change
ensures /etc/systemd/system is present before trying to
create unit files there.
Fixes#53
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>
- Creation of openrc and clouds.yaml file should be done
in the current directory of the user running the playbook.
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>
This role will start a docker container with keystone
already configured with SSL based on the dockerhub image
clearlinux/keystone
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
The synchronize module uses rsync to transfer files between
hosts. The default behaviour is to compress the file before
transfer but tests show that it's faster to just transfer
the cnci image uncompressed.
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>
The playbook installs ciao binaries under
/usr/local/bin when ciao_dev is set to True.
This directory is not present by default.
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>