Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Terraform Openstack
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container 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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Krish Moodbidri
Terraform Openstack
Commits
3245d36a
Commit
3245d36a
authored
1 year ago
by
Krish Moodbidri
Browse files
Options
Downloads
Patches
Plain Diff
Move Ansible Playbook Execution to OHPC Instance User Data
parent
dda7b3fe
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#10053
failed with stages
in 26 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main.tf
+6
-6
6 additions, 6 deletions
main.tf
ohpc-instance/main.tf
+5
-1
5 additions, 1 deletion
ohpc-instance/main.tf
with
11 additions
and
7 deletions
main.tf
+
6
−
6
View file @
3245d36a
...
@@ -133,12 +133,12 @@ resource "null_resource" "ops" {
...
@@ -133,12 +133,12 @@ resource "null_resource" "ops" {
}
}
# compute node registration on ohpc
# compute node registration on ohpc
provisioner
"remote-exec"
{
#
provisioner "remote-exec" {
inline
=
[
#
inline = [
for
node
,
net
in
module
.
nodes
.
network
:
#
for node, net in module.nodes.network:
"ansible-playbook -c local -i /CRI_XCBC/hosts -l `hostname -s` -e
\"
{'cod_deploy':'false', 'compute_nodes':[{'name':'
${
node
}
', 'ip':'
${
net
[
0
].
fixed_ip_v4
}
', 'mac':'
${
net
[
0
].
mac
}
', 'vnfs':'', 'sockets':'1', 'corespersocket':'1'}]}
\"
/CRI_XCBC/site-ops.yaml -b -v"
#
"ansible-playbook -c local -i /CRI_XCBC/hosts -l `hostname -s` -e \"{'cod_deploy':'false', 'compute_nodes':[{'name':'${node}', 'ip':'${net[0].fixed_ip_v4}', 'mac':'${net[0].mac}', 'vnfs':'', 'sockets':'1', 'corespersocket':'1'}]}\" /CRI_XCBC/site-ops.yaml -b -v"
]
#
]
}
#
}
# ood node
# ood node
# provisioner "remote-exec" {
# provisioner "remote-exec" {
...
...
This diff is collapsed.
Click to expand it.
ohpc-instance/main.tf
+
5
−
1
View file @
3245d36a
...
@@ -49,7 +49,11 @@ resource "openstack_compute_instance_v2" "ohpc" {
...
@@ -49,7 +49,11 @@ resource "openstack_compute_instance_v2" "ohpc" {
# Clone CRI_Cluster_Monitor repository
# Clone CRI_Cluster_Monitor repository
-
git
clone
https
:
//github.com/eesaanatluri/CRI_Cluster_Monitor.git /CRI_Cluster_Monitor
-
git
clone
https
:
//github.com/eesaanatluri/CRI_Cluster_Monitor.git /CRI_Cluster_Monitor
EOF
# Run Ansible playbook
runcmd
:
-
ansible-playbook
-
c
local
-
i
/
CRI_XCBC
/
hosts
-
l
`
hostname
-
s
`
-
e
"{'cod_deploy':'false', 'compute_nodes':[{'name':'
${
var
.
ohpc_instance_name
}
', 'ip':'
${
var
.
internal_ip
}
', 'mac':'
${
mac_address
}
', 'vnfs':'', 'sockets':'1', 'corespersocket':'1'}]}"
/
CRI_XCBC
/
site-ops
.
yaml
-
b
-
v
EOF
# defines the networks of the instance
# defines the networks of the instance
network
{
network
{
...
...
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