Commit Graph

151 Commits

Author SHA1 Message Date
Alberto Murillo 9860b1ee9d ciao-controller: Sync workloads with ciao
Fixes #88

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-10-14 14:37:56 -05:00
Erick CARDONA dc69f6be64 ciao-compute: Download OVMF.fd when RedHat-based distros (#79)
When using RedHat based compute nodes, it skips the copy of the file.
This commit adds a rule to handle the download when this scenario occurs.

Fixes https://github.com/clearlinux/clear-config-management/issues/77

Signed-off-by: Erick Cardona <erick.cardona.ruiz@intel.com>
4.7
2016-10-11 13:00:11 -05:00
Alberto Murillo a53d5c56bc ciao-controller: Do not create /etc/ssl/certs
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>
2016-10-11 12:58:22 -05:00
Alberto Murillo f9d3123ce1 ciao-controller: Run losetup as root
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-10-11 11:31:14 -05:00
Marcos Simental 55820f8541 ciao-controller: fix syntax typo while creating cnci image (#80)
Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
4.6
2016-10-07 15:47:51 -05:00
Alberto Murillo e5fc7176c9 Docker: Start docker service in clearlinux (#78)
* 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>
4.5
2016-10-07 13:39:10 -05:00
Erick CARDONA c5b444a690 ciao-compute, ciao-network: remove the strategy free feature (#73)
The strategy free was causing some weird behaviour when running parallel tasks.
Returning to the default execution strategy fix this.

Closes https://github.com/clearlinux/clear-config-management/issues/72

Signed-off-by: Erick Cardona <erick.cardona.ruiz@intel.com>
2016-10-07 10:57:35 -05:00
Marcos Simental c9dba10716 ciao-controller: remove nbd usage, using loops instead. (#76)
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>
2016-10-07 10:17:53 -05:00
Marcos Simental 8c28d57cdc ciao-common: update cloud-image link for clearlinux (#71)
Provide a static link for the cloud image.

Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
4.4
2016-10-05 16:58:24 -05:00
Marcos Simental a6cd7f5315 ciao-controller: explicitly specify local tasks for build. (#70)
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>
2016-10-05 14:47:10 -05:00
Alberto Murillo 48eabe3b52 ciao: Change default value for gopath (#68)
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>
2016-10-03 17:57:30 -05:00
Alberto Murillo fe5aba7d4f ciao-controller: remove secret_path option from configuration
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>
2016-10-03 13:36:34 -05:00
Alberto Murillo baaffe8387 ciao: Add a note on docker hostname resolution (#56)
docker containers uses /etc/resolv.conf file from the
host machine filtering any localhost reference in it.

If after the filter there are no nameservers entries then
the daemon adds google public dns servers (8.8.8.8 and 8.8.4.4)

This Changes adds a note to remind the administrator to setup a
dns server that the containers can use to resolv the ciao cluster
nodes names.

Fixes #39

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-09-29 11:44:58 -05:00
Alberto Murillo e92592adce ciao: create admin-openrc and demo-openrc (#60)
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>
2016-09-27 11:19:51 -05:00
Alberto Murillo ed877efe97 ciao-common: Create /etc/systemd/system (#61)
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>
2016-09-27 10:53:48 -05:00
Jesus Ornelas Aguayo 988a02a9e4 ciao: enable scp_if_ssh in ansible.cfg
When deploying from an ubuntu or fedora machine to a
ClearLinux node, ansible tries to use sftp which is
disabled in ClearLinux by default.

Enabling scp_if_ssh in ansible.cfg makes anisble use
ssh to copy files to the nodes.

Fixes #54

Signed-off-by: Jesus Ornelas Aguayo <jesus.ornelas.aguayo@intel.com>
2016-09-26 10:21:03 -05:00
Alberto Murillo 4e07e12e34 ciao/README.md: Update instructions (#48)
- Specify ansible requirements for managed nodes and control machine
- Specify passwordless sudo is required in deployment machine and managed nodes
- Specify which commands have to be run as sudo

Fixes #37

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-09-23 10:52:54 -05:00
Alberto Murillo 89dd487af9 ciao-common: Add gopath variable
- 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>
2016-09-19 14:37:25 -05:00
Alberto Murillo 601dfe89a8 documentation: Add contribution notice
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>
2016-09-19 11:54:01 -05:00
Alberto Murillo 93cf10a1bb ciao-controller: Do not validate certs when downloading images
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>
4.3
2016-09-09 14:04:38 -05:00
Alberto Murillo c65d594bad Restart services when binaries gets updated.
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>
2016-09-09 11:13:27 -05:00
Alberto Murillo ae2051a282 ciao-controller: Add ceph configuration
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>
2016-09-09 10:53:28 -05:00
Alberto Murillo 4b0633187c ciao-controller: Create storage service and endpoint in keystone
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-09-07 15:48:30 -05:00
Alberto Murillo 988fae36aa keystone: Fix become issues
- 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>
2016-09-07 12:14:51 -05:00
Alberto Murillo 04bfb3264f examples/ciao: Update documentation (#36)
examples/ciao: Update documentation
2016-09-07 09:46:59 -05:00
Alberto Murillo f870a3ef20 Update ciao deployment
- 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>
2016-09-02 11:17:47 -05:00
Alberto Murillo 41bf025adc keystone: Run a keystone container
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>
2016-09-02 11:17:47 -05:00
Alberto Murillo ad80d0b4dd Deprecate OpenStack roles
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-09-02 11:17:47 -05:00
Alberto Murillo 80494ca417 docker: Add docker role
This role installs docker 1.12 in ubuntu, fedora and clearlinux

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-09-02 10:02:51 -05:00
Alberto Murillo 0545463144 ciao-controller: update mgmt_net and compute_net vars
mgmt_net and compute_net use to be a scalar value.

They are now a list of networks

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-16 11:43:36 -05:00
Alberto Murillo 7fa70e9102 examples: ciao: add ansible.cfg
ansible.cfg enables pipelining for an extra boost in speed

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
4.2
2016-08-16 09:43:12 -05:00
Alberto Murillo d5f15caad2 ceph: sync ceph roles
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-16 08:57:59 -05:00
Alberto Murillo b7ea92a979 examples: add profile_tasks to ansible.cfg
profile_tasks prints how much time takes each task to run

The feature is disabled by default but can be enabled by
uncommenting the corresponding line in ansible.cfg

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
4.1
2016-08-15 16:24:53 -05:00
Alberto Murillo f01de4d9dd ciao-network: Do not compress cnci image during transfer
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>
2016-08-15 16:05:07 -05:00
Alberto Murillo 0c6edeaa28 examples: ciao: cleanup: Remove bundles in clearlinux
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-12 18:05:23 -05:00
Alberto Murillo 92d4df2fda os-keystone: Refactor code
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-11 17:55:12 -05:00
Alberto Murillo 9ef93eff40 ceph: examples: Add cephfs
Ceph FileSystem requires a metadata server.
This functionallity is already provided.

This commit updates the example to install a metadata server.

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-11 17:31:27 -05:00
Alberto Murillo b4b875b544 ciao: examples: Speed things up
- Add an ansible.cfg file to enable pipelining.

  Pipelining increases the performance by executing many ansible
  modules without actual file transfer.

- Prerun ciao-common

  ciao-common role install ciao code and dependencies. By running
  this role on all nodes in parallel we can save some time.

- Set strategy: free

  By default all hosts will run each task before any host starts the next task
  Using the 'free' strategy allows each host to run until the end of the play
   as fast as it can.:

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-11 15:04:14 -05:00
Alberto Murillo c0a6def082 ciao: Refactor code
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-11 14:51:21 -05:00
Alberto Murillo 20a861ea14 ciao-controller: Add a note on ciao_guest_{user,key} (#31)
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>
4.0
2016-08-04 16:43:17 -05:00
Alberto Murillo ac18e464df ciao-controller: Create the cnci image once.
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>
2016-08-04 16:42:20 -05:00
Alberto Murillo 5ab9fa9606 ciao-controller: Fix CA Certificate handling
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.
2016-08-04 15:42:07 -05:00
Alberto Murillo 73938b5f6e examples: ciao: Create a demo user and project
A demo user and a demo project is included in the example
for testing purposes of a ciao cluster.

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-04 13:05:11 -05:00
Alberto Murillo f013bcf820 ciao-controller: Build CIAO from sources is always 'changed'
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>
2016-08-04 13:04:15 -05:00
Alberto Murillo 38dd039c70 examples: ciao: Include ciao_dev var in examples
If ciao_dev is set to false (default) it will try to install
ciao from the operating system packages which is only supported
in Clear Linux.

In order to install ciao in Ubuntu, ciao_dev must be set to
true to build ciao from github master branch.

This commit adds the variable to the examples to have it handy
for users who wants to deploy ciao in Ubuntu.

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-04 12:15:14 -05:00
Alberto Murillo 9f75090e61 examples: ciao: Do not fail if optional variables are missing
- ciao_dev might not be defined and should be treated as false by default
- mysql_packages is defined for ubuntu and should not cause a failure
  in clearlinux when not defined.

Fixes #30

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-04 10:40:30 -05:00
Alberto Murillo 61d93fe24b examples: ciao: Cleanup now supports Ubuntu 16.04 (Xenial)
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-02 17:56:21 -05:00
Alberto Murillo 07f3b6c99b ciao-network: Add support for Ubuntu 16.04 (Xenial)
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-02 17:53:22 -05:00
Alberto Murillo e1dfb9c4ad ciao-compute: Add support for Ubuntu 16.04 (Xenial)
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-02 17:52:53 -05:00
Alberto Murillo 3a91ad13b1 ciao-controller: Add support for Ubuntu 16.04 (Xenial)
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-02 17:50:10 -05:00