Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
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
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
Very Demiurge Very Mindful
Kolla Ansible
Commits
c6774799
Commit
c6774799
authored
7 years ago
by
Zuul
Committed by
Gerrit Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "fix shell error about tools/init-vpn"
parents
50a30f73
0c6879b8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/init-vpn
+5
-6
5 additions, 6 deletions
tools/init-vpn
with
5 additions
and
6 deletions
tools/init-vpn
+
5
−
6
View file @
c6774799
...
...
@@ -19,8 +19,7 @@ function setup_site(){
function
get_external_ip
(){
local
router_id
=
`
neutron router-show
$1
|
awk
'/ id /{print $4}'
`
echo
`
neutron port-list
-c
fixed_ips
-c
device_id
-c
device_owner|grep router_gateway |
awk
'/'
.
$router_id
.
'/{print $5}'
|
sed
's/["}]//g'
`
echo
`
neutron router-list |
grep
'$router_id'
|
awk
-F
'"'
'{print $16}'
`
}
function
clean_site
(){
...
...
@@ -42,11 +41,11 @@ function setup(){
WEST_IP
=
$(
get_external_ip router_west
)
setup_site east
$EAST_SUBNET
EAST_IP
=
$(
get_external_ip router_east
)
neutron ipsec-site-connection-create
--name
conn_east
--vpnservice-id
vpn_east
--ikepolicy-id
ikepolicy1
--ipsecpolicy-id
ipsecpolicy1
--peer-address
$WEST_IP
--peer-id
$WEST_IP
--peer-cidr
neutron ipsec-site-connection-create
--name
conn_east
--vpnservice-id
vpn_east
--ikepolicy-id
\
ikepolicy1
--ipsecpolicy-id
ipsecpolicy1
--peer-address
$WEST_IP
--peer-id
$WEST_IP
--peer-cidr
\
$WEST_SUBNET
--psk
secret
neutron ipsec-site-connection-create
--name
conn_west
--vpnservice-id
vpn_west
--ikepolicy-id
ikepolicy1
--ipsecpolicy-id
ipsecpolicy1
--peer-address
$EAST_IP
--peer-id
$EAST_IP
--peer-cidr
neutron ipsec-site-connection-create
--name
conn_west
--vpnservice-id
vpn_west
--ikepolicy-id
\
ikepolicy1
--ipsecpolicy-id
ipsecpolicy1
--peer-address
$EAST_IP
--peer-id
$EAST_IP
--peer-cidr
\
$EAST_SUBNET
--psk
secret
}
...
...
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