Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
comp90023-assignment-2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Matthew O'Halloran
comp90023-assignment-2
Commits
6e676336
Commit
6e676336
authored
Apr 30, 2020
by
matt01671
Browse files
Options
Downloads
Patches
Plain Diff
cluster servers
parent
db1c3bee
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ansible/host_vars/nectar.yaml
+14
-13
14 additions, 13 deletions
ansible/host_vars/nectar.yaml
ansible/roles/cluster-security-group/tasks/main.yaml
+3
-3
3 additions, 3 deletions
ansible/roles/cluster-security-group/tasks/main.yaml
with
17 additions
and
16 deletions
ansible/host_vars/nectar.yaml
+
14
−
13
View file @
6e676336
...
@@ -3,13 +3,13 @@ availability_zone: melbourne-qh2-uom
...
@@ -3,13 +3,13 @@ availability_zone: melbourne-qh2-uom
# Volume
# Volume
volumes
:
volumes
:
-
vol_name
:
db
-
volume
-
1
-
vol_name
:
dbvolume1
vol_size
:
10
vol_size
:
10
-
vol_name
:
db
-
volume
-
2
-
vol_name
:
dbvolume2
vol_size
:
10
vol_size
:
10
-
vol_name
:
db
-
volume
-
3
-
vol_name
:
dbvolume3
vol_size
:
10
vol_size
:
10
-
vol_name
:
web
-
volume
-
vol_name
:
webvolume
vol_size
:
10
vol_size
:
10
# Security group
# Security group
...
@@ -31,25 +31,26 @@ cluster_security_group:
...
@@ -31,25 +31,26 @@ cluster_security_group:
-
name
:
couchDB-cluster
-
name
:
couchDB-cluster
description
:
"
Security
group
for
CouchDB
cluster"
description
:
"
Security
group
for
CouchDB
cluster"
protocol
:
tcp
protocol
:
tcp
port_name_mix
:
3306
port_range_min
:
3306
port_name_max
:
3306
port_range_max
:
3306
sg_remote_group
:
couchDB-cluster
# Instance
# Instance
instances
:
instances
:
-
name
:
db
-
1
-
name
:
db1
volumes
:
[
'
db
-
volume
-
1'
]
volumes
:
[
'
dbvolume1'
]
meta
:
meta
:
group
:
dbs
group
:
dbs
-
name
:
db
-
2
-
name
:
db2
volumes
:
[
'
db
-
volume
-
2'
]
volumes
:
[
'
dbvolume2'
]
meta
:
meta
:
group
:
dbs
group
:
dbs
-
name
:
db
-3
-
name
:
db
3
volumes
:
[
'
db
-
volume
-
3'
]
volumes
:
[
'
dbvolume3'
]
meta
:
meta
:
group
:
dbs
group
:
dbs
-
name
:
web
-
name
:
web
volumes
:
[
'
web
-
volume'
]
volumes
:
[
'
webvolume'
]
meta
:
meta
:
group
:
web
group
:
web
...
...
This diff is collapsed.
Click to expand it.
ansible/roles/cluster-security-group/tasks/main.yaml
+
3
−
3
View file @
6e676336
...
@@ -9,11 +9,11 @@
...
@@ -9,11 +9,11 @@
-
name
:
Create a list of security group names
-
name
:
Create a list of security group names
set_fact
:
set_fact
:
sg_names
:
'
{{
sg_names|default([])
+
[
item.name
]
}}'
cluster_
sg_names
:
'
{{
cluster_
sg_names|default([])
+
[
item.name
]
}}'
loop
:
'
{{
cluster_security_group
}}'
loop
:
'
{{
cluster_security_group
}}'
-
debug
:
-
debug
:
msg
:
"
Security
group(s)
{{
sg_names
}}
have
been
created."
msg
:
"
Security
group(s)
{{
cluster_
sg_names
}}
have
been
created."
# Create security group rules
# Create security group rules
-
name
:
Create security group rules
-
name
:
Create security group rules
...
@@ -22,6 +22,6 @@
...
@@ -22,6 +22,6 @@
protocol
:
'
{{
item.protocol
}}'
protocol
:
'
{{
item.protocol
}}'
port_range_min
:
'
{{
item.port_range_min
}}'
port_range_min
:
'
{{
item.port_range_min
}}'
port_range_max
:
'
{{
item.port_range_max
}}'
port_range_max
:
'
{{
item.port_range_max
}}'
remote_group
:
'
{{
sg_names
}}'
remote_group
:
'
{{
item.sg_remote_group
}}'
state
:
present
state
:
present
loop
:
'
{{
cluster_security_group
}}'
loop
:
'
{{
cluster_security_group
}}'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment