Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #962 from albertomurillo/launcher
Browse files Browse the repository at this point in the history
ansible: create ciao-launcher role
  • Loading branch information
Tim Pepper committed Jan 6, 2017
2 parents 225e633 + 2afcacc commit 6112b5b
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 160 deletions.
4 changes: 3 additions & 1 deletion _DeploymentAndDistroPackaging/ansible/ciao_computes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

- hosts: computes
become: yes
vars:
ciao_role: compute
roles:
- docker
- ciao-compute
- ciao-launcher
4 changes: 3 additions & 1 deletion _DeploymentAndDistroPackaging/ansible/ciao_networks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@

- hosts: networks
become: yes
vars:
ciao_role: network
roles:
- ciao-network
- ciao-launcher
2 changes: 2 additions & 0 deletions _DeploymentAndDistroPackaging/ansible/cleanup/ciao.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
with_items:
- ciao-network.service
- ciao-compute.service
- ciao-launcher.service
- docker.service
- docker-cor.service
ignore_errors: yes
Expand All @@ -76,6 +77,7 @@
with_items:
- /etc/systemd/system/ciao-network.service
- /etc/systemd/system/ciao-compute.service
- /etc/systemd/system/ciao-launcher.service

- name: Remove CIAO files
file: path={{ item }} state=absent
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# clearlinux.ciao-compute
Ansible role to install the compute node for a CIAO cluster
# clearlinux.ciao-launcher
Ansible role to install the compute or network node for a CIAO cluster

## Requirements
* docker
Expand All @@ -16,8 +16,16 @@ The available variables for this roles are the variables from [ciao-common](../c
file *ciao.yml*
```
- hosts: computes
vars:
ciao_role: compute
roles:
- clearlinux.ciao-compute
- clearlinux.ciao-launcher
- hosts: networks
vars:
ciao_role: network
roles:
- clearlinux.ciao-launcher
```

file *group_vars/all*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.

- name: restart network
service: name=ciao-network.service enabled=yes state=restarted
- name: restart launcher
service: name=ciao-launcher.service enabled=yes state=restarted
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

galaxy_info:
author: Alberto Murillo
description: Ansible role to install the network node for a CIAO cluster
description: Ansible role to install the compute or network node for a CIAO cluster
company: Intel

issue_tracker_url: https://github.com/01org/ciao
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
- ciao-cli
- ciao-launcher
when: ciao_dev
notify: restart network
notify: restart launcher

- name: Copy Network Node Agent Key
- name: Copy ciao certificates
copy: src=certificates/ciao/{{ item }} dest=/etc/pki/ciao/{{ item }}
with_items:
- CAcert-{{ ciao_controller_fqdn }}.pem
- cert-NetworkingAgent-localhost.pem
- "{{ agent_key }}"
notify: restart launcher
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

- include_vars: "{{ ciao_role }}.yml"
- include: install.yml
- include: startservices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Create ciao-network unit
template: src=ciao-network.service.j2 dest=/etc/systemd/system/ciao-network.service
- name: Create ciao-launcher unit
template: src=ciao-launcher.service.j2 dest=/etc/systemd/system/ciao-launcher.service
notify:
- reload systemd config
- restart network
- restart launcher

- meta: flush_handlers

- name: Ensure ciao-network service is running
service: name=ciao-network.service enabled=yes state=started
- name: Ensure ciao-launcher service is running
service: name=ciao-launcher.service enabled=yes state=started
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[Unit]
Description=CIAO Compute Launcher Service
Description=CIAO Launcher Service
After=network.target

[Service]
Type=simple
ExecStart={{ bindir }}/ciao-launcher --cacert=/etc/pki/ciao/CAcert-{{ ciao_controller_fqdn }}.pem \
--cert=/etc/pki/ciao/cert-CNAgent-localhost.pem \
--cert=/etc/pki/ciao/{{ agent_key }} \
--logtostderr -v 2
Restart=always
KillMode=process
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.

- include: install.yml
- include: startservices.yml
# Name of the compute node agent key
agent_key: cert-CNAgent-localhost.pem
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.

- name: restart compute
service: name=ciao-compute.service enabled=yes state=restarted
# Name of the network node agent key
agent_key: cert-NetworkingAgent-localhost.pem
30 changes: 0 additions & 30 deletions _DeploymentAndDistroPackaging/ansible/roles/ciao-network/README.md

This file was deleted.

This file was deleted.

0 comments on commit 6112b5b

Please sign in to comment.