Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ohpc_vagrant
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
John-Paul Robinson
ohpc_vagrant
Merge requests
!37
WIP: Remove the hard coded floating ip address
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
WIP: Remove the hard coded floating ip address
chirag24/ohpc_vagrant:feat_openstack
into
feat-openstack
Overview
0
Commits
2
Pipelines
0
Changes
2
Open
Chirag Chandrahas Shetty
requested to merge
chirag24/ohpc_vagrant:feat_openstack
into
feat-openstack
5 years ago
Overview
0
Commits
2
Pipelines
0
Changes
2
Expand
Created two floating IP address by using the OpenStack API.
Gets a list of floating IP addresses using the OpenStack API to calculate the correct host_ssh_ip.
👍
0
👎
0
Merge request reports
Compare
feat-openstack
feat-openstack (base)
and
latest version
latest version
24ca3c80
2 commits,
5 years ago
2 files
+
13
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
Vagrantfile
+
10
−
3
Options
# -*- mode: ruby -*-
# vi: set ft=ruby :
def
get_ssh_host_ip
(
floating_ip
)
ip_byte_array
=
floating_ip
.
split
(
"."
)
return
'164.111.161.'
+
ip_byte_array
[
3
]
end
Vagrant
.
configure
(
"2"
)
do
|
config
|
ips
=
`openstack floating ip list -c "Floating IP Address" -f value`
puts
ips
ip_array
=
ips
.
split
(
' '
)
config
.
ssh
.
username
=
'centos'
config
.
vm
.
allowed_synced_folder_types
=
[
:rsync
]
#config.ssh.private_key_path = "~/.ssh/id_rsa.pub"
@@ -28,12 +35,12 @@ Vagrant.configure("2") do |config|
config
.
vm
.
define
"ohpc"
do
|
ohpc
|
ohpc
.
ssh
.
host
=
'164.111.161.145'
ohpc
.
ssh
.
host
=
get_ssh_host_ip
(
ip_array
[
0
])
ohpc
.
vm
.
hostname
=
"ohpc"
ohpc
.
vm
.
provider
:openstack
do
|
ohpc
|
ohpc
.
server_name
=
'ohpc'
ohpc
.
floating_ip
=
"192.168.16.145"
ohpc
.
floating_ip
=
ip_array
[
0
]
ohpc
.
image
=
'CentOS-7-x86_64-GenericCloud-1905'
end
end
Loading