-
Notifications
You must be signed in to change notification settings - Fork 1
/
keylime_server_deploy.yml
73 lines (62 loc) · 2.05 KB
/
keylime_server_deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
- hosts: keylime-server
tasks:
# - name: clone repo to directory
# become: yes
# become_user: root
# git:
# repo: https://github.com/BU-NU-CLOUD-SP18/Secure-Cloud-Automated-Deployment.git
# dest: /home/centos/bolted
# clone: yes
# - name: install docker py module
# command: pip install docker-py
# - name: build keylime server docker image
# become: yes
# become_user: root
# command: docker build -t keylime:latest .
# args:
# chdir: /home/centos/bolted/containers/keylime
- name: pull keylime server image from docker hub
become: yes
become_user: root
docker_image:
name: leonjia0112/keylime:first
# - name: build keylime server docker image
# docker_image:
# path: /home/centos/bolted/containers/keylime
# name: keylime
# tag: latest
# - name: update host ip address in keylime configuration file
# become: yes
# become_user: root
# command: ./ip_setup.sh {{ inventory_hostname }}
# args:
# chdir: /home/centos/bolted/containers/keylime
# - name: run keylime container with registrar and verifier
# command: docker run -itd --name keylime-server -p 8881:8881 -p 8890:8890 -p 8891:8891 -p 8990:8990 -p 8991:8991 -p 8992:8992 keylime:latest bash "run.sh"
# args:
# chdir: /home/centos/bolted/containers/keylime
# ansible module version of create container
- name: run keylime server container, registrar and verifier
become: yes
become_user: root
docker_container:
name: keylime-server
image: leonjia0112/keylime:first
state: started
pull: no
interactive: yes
tty: yes
detach: yes
command: ["bash", "/root/keylime/test/run.sh"]
ports:
- "8881:8881"
- "8890:8890"
- "8891:8891"
- "8990:8990"
- "8991:8991"
- "8992:8992"
- name: print message
debug:
msg: "finished keylime server at {{ inventory_hostname }}"
...