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
b49c8684
Commit
b49c8684
authored
4 years ago
by
Zuul
Committed by
Gerrit Code Review
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge "[CI] Ensure network is set for Zun"
parents
3d30624c
7a3072e9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test-zun.sh
+8
-2
8 additions, 2 deletions
tests/test-zun.sh
tools/init-runonce
+9
-10
9 additions, 10 deletions
tools/init-runonce
with
17 additions
and
12 deletions
tests/test-zun.sh
+
8
−
2
View file @
b49c8684
...
@@ -15,7 +15,7 @@ function test_zun_logged {
...
@@ -15,7 +15,7 @@ function test_zun_logged {
openstack subnet
set
--no-dhcp
demo-subnet
openstack subnet
set
--no-dhcp
demo-subnet
sudo
docker pull alpine
sudo
docker pull alpine
sudo
docker save alpine | openstack image create alpine
--public
--container-format
docker
--disk-format
raw
sudo
docker save alpine | openstack image create alpine
--public
--container-format
docker
--disk-format
raw
openstack appcontainer run
--name
test
alpine
sleep
1000
openstack appcontainer run
--net
network
=
demo-net
--name
test
alpine
sleep
1000
attempt
=
1
attempt
=
1
while
[[
$(
openstack appcontainer show
test
-f
value
-c
status
)
!=
"Running"
]]
;
do
while
[[
$(
openstack appcontainer show
test
-f
value
-c
status
)
!=
"Running"
]]
;
do
echo
"Container not running yet"
echo
"Container not running yet"
...
@@ -61,7 +61,7 @@ function test_zun_logged {
...
@@ -61,7 +61,7 @@ function test_zun_logged {
fi
fi
sleep
10
sleep
10
done
done
openstack appcontainer run
--name
test2
--mount
source
=
zun_test_volume,destination
=
/data alpine
sleep
1000
openstack appcontainer run
--net
network
=
demo-net
--name
test2
--mount
source
=
zun_test_volume,destination
=
/data alpine
sleep
1000
attempt
=
1
attempt
=
1
while
[[
$(
openstack volume show zun_test_volume
-f
value
-c
status
)
!=
"in-use"
]]
;
do
while
[[
$(
openstack volume show zun_test_volume
-f
value
-c
status
)
!=
"in-use"
]]
;
do
echo
"Volume not attached yet"
echo
"Volume not attached yet"
...
@@ -105,6 +105,12 @@ capsuleVersion: beta
...
@@ -105,6 +105,12 @@ capsuleVersion: beta
kind: capsule
kind: capsule
metadata:
metadata:
name: capsule-test
name: capsule-test
# NOTE(yoctozepto): Capsules do not support nets in Ussuri.
# See https://bugs.launchpad.net/zun/+bug/1895263
# The choice for CI is worked around by ensuring the networks are created
# in the desired order in init-runonce.
#nets:
# - network: demo-net
spec:
spec:
containers:
containers:
- image: alpine
- image: alpine
...
...
This diff is collapsed.
Click to expand it.
tools/init-runonce
+
9
−
10
View file @
b49c8684
...
@@ -77,22 +77,21 @@ $KOLLA_OPENSTACK_COMMAND image create --disk-format qcow2 --container-format bar
...
@@ -77,22 +77,21 @@ $KOLLA_OPENSTACK_COMMAND image create --disk-format qcow2 --container-format bar
--property
os_type
=
${
IMAGE_TYPE
}
--file
${
IMAGE_PATH
}
/
${
IMAGE
}
${
IMAGE_NAME
}
--property
os_type
=
${
IMAGE_TYPE
}
--file
${
IMAGE_PATH
}
/
${
IMAGE
}
${
IMAGE_NAME
}
echo
Configuring neutron.
echo
Configuring neutron.
if
[[
$ENABLE_EXT_NET
-eq
1
]]
;
then
$KOLLA_OPENSTACK_COMMAND
network create
--external
--provider-physical-network
physnet1
\
$KOLLA_OPENSTACK_COMMAND
router create demo-router
--provider-network-type
flat public1
$KOLLA_OPENSTACK_COMMAND
subnet create
--no-dhcp
\
--allocation-pool
${
EXT_NET_RANGE
}
--network
public1
\
--subnet-range
${
EXT_NET_CIDR
}
--gateway
${
EXT_NET_GATEWAY
}
public1-subnet
fi
$KOLLA_OPENSTACK_COMMAND
network create demo-net
$KOLLA_OPENSTACK_COMMAND
network create demo-net
$KOLLA_OPENSTACK_COMMAND
subnet create
--subnet-range
10.0.0.0/24
--network
demo-net
\
$KOLLA_OPENSTACK_COMMAND
subnet create
--subnet-range
10.0.0.0/24
--network
demo-net
\
--gateway
10.0.0.1
--dns-nameserver
8.8.8.8 demo-subnet
--gateway
10.0.0.1
--dns-nameserver
8.8.8.8 demo-subnet
$KOLLA_OPENSTACK_COMMAND
router create demo-router
$KOLLA_OPENSTACK_COMMAND
router add subnet demo-router demo-subnet
$KOLLA_OPENSTACK_COMMAND
router add subnet demo-router demo-subnet
if
[[
$ENABLE_EXT_NET
-eq
1
]]
;
then
if
[[
$ENABLE_EXT_NET
-eq
1
]]
;
then
$KOLLA_OPENSTACK_COMMAND
router
set
--external-gateway
public1 demo-router
$KOLLA_OPENSTACK_COMMAND
network create
--external
--provider-physical-network
physnet1
\
--provider-network-type
flat public1
$KOLLA_OPENSTACK_COMMAND
subnet create
--no-dhcp
\
--allocation-pool
${
EXT_NET_RANGE
}
--network
public1
\
--subnet-range
${
EXT_NET_CIDR
}
--gateway
${
EXT_NET_GATEWAY
}
public1-subnet
$KOLLA_OPENSTACK_COMMAND
router
set
--external-gateway
public1 demo-router
fi
fi
# Get admin user and tenant IDs
# Get admin user and tenant IDs
...
...
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