This repository was archived by the owner on May 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnm_openstack.yml
More file actions
126 lines (122 loc) · 4.44 KB
/
nm_openstack.yml
File metadata and controls
126 lines (122 loc) · 4.44 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
---
- name: get ansible information
hosts: localhost
tasks:
- name: setup
setup:
- name: Get information from user
hosts: localhost
gather_facts: false
vars_prompt:
- name: "openstack_auth_url"
prompt: "Enter your OpenStack Auth URL"
private: no
default: http://cloud.cit.tu-berlin.de:5000/v2.0
- name: "openstack_auth_username"
prompt: "Enter your OpenStack user name"
private: no
default: mockfog-user
- name: "openstack_auth_password"
prompt: "Enter your OpenStack password"
default:
- name: "openstack_auth_project_name"
prompt: "Enter the OpenStack Project name"
default: MockFog
private: no
- name: "openstack_ssh_user"
prompt: "Enter the default user of the Cloud image you want to use"
default: ubuntu
private: no
- name: "openstack_ssh_key_name"
prompt: "Enter the name for the SSH Key used by OpenStack"
default: mockfog
private: no
#- name: "network_os_mgmt_network_name"
# prompt: "Enter the name for the management network"
# default: mgmt
# private: no
#- name: "network_os_mgmt_subnet_name"
# prompt: "Enter the name for the management subnet"
# default: mgmt_sub
# private: no
#- name: "network_os_mgmt_cidr"
# prompt: "Enter the CIDR for the mgmt subnet"
# default: 192.168.100.0/24
# private: no
#- name: "network_os_router_ip"
# prompt: "Enter the IP of the MockFog Router (must be in mgmt subnet)"
# default: 192.168.100.1
# private: no
- name: "network_os_external_network"
prompt: "Enter the external network of the OpenStack cloud"
default: tu-internal
private: no
- name: "nm_os_name"
prompt: "Enter the name of the NodeManager VM"
default: MFog-manager
private: no
- name: "nm_os_image"
prompt: "Enter the image of the NodeManager VM"
default: ubuntu-16.04
private: no
- name: "nm_os_flavor"
prompt: "Enter the flavor of the NodeManager VM"
default: MockFog-NM
private: no
roles:
- manager-bootstrap
post_tasks:
- set_fact:
openstack_auth_url: "{{ openstack_auth_url }}"
openstack_auth_username: "{{ openstack_auth_username }}"
openstack_auth_password: "{{ openstack_auth_password }}"
openstack_auth_project_name: "{{ openstack_auth_project_name }}"
openstack_ssh_user: "{{ openstack_ssh_user }}"
network_os_mgmt_network_name: "{{ network_os_mgmt_network_name }}"
network_os_mgmt_subnet_name: "{{ network_os_mgmt_subnet_name }}"
network_os_mgmt_cidr: "{{ network_os_mgmt_cidr }}"
network_os_router_ip: "{{ network_os_router_ip }}"
network_os_external_network: "{{ network_os_external_network }}"
openstack_ssh_key_name: "{{ openstack_ssh_key_name }}"
tags: bootstrap
vars:
local:
cloud: openstack
- name: Wait for NodeManager Node to be ready
hosts: MockFog_NM
gather_facts: false
tasks:
- local_action:
module: wait_for
host: "{{ inventory_hostname }}"
port: 22
delay: 5
timeout: 60
tags: bootstrap
- name: Install Nodemanager
hosts: MockFog_NM
become: yes
gather_facts: false
vars_prompt:
- name: "github_user"
prompt: "Enter your github username"
private: no
- name: "github_password"
prompt: "Enter your github password"
private: yes
roles:
- manager-install
vars:
local:
cloud: openstack
openstack_auth_url: "{{ hostvars['localhost']['openstack_auth_url'] }}"
openstack_auth_username: "{{ hostvars['localhost']['openstack_auth_username'] }}"
openstack_auth_password: "{{ hostvars['localhost']['openstack_auth_password'] }}"
openstack_auth_project_name: "{{ hostvars['localhost']['openstack_auth_project_name'] }}"
openstack_ssh_user: "{{ hostvars['localhost']['openstack_ssh_user'] }}"
network_os_mgmt_network_name: "{{ hostvars['localhost']['network_os_mgmt_network_name'] }}"
network_os_mgmt_subnet_name: "{{ hostvars['localhost']['network_os_mgmt_subnet_name'] }}"
network_os_mgmt_cidr: "{{ hostvars['localhost']['network_os_mgmt_cidr'] }}"
network_os_router_ip: "{{ hostvars['localhost']['network_os_router_ip'] }}"
network_os_external_network: "{{ hostvars['localhost']['network_os_external_network'] }}"
openstack_ssh_key_name: "{{ hostvars['localhost']['openstack_ssh_key_name'] }}"