Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
4ad56e27
Unverified
Commit
4ad56e27
authored
Jan 14, 2023
by
Luke Simmons
Committed by
GitHub
Jan 14, 2023
Browse files
Options
Downloads
Patches
Plain Diff
Fix for creating VirtualMachine (#9657)
parent
6f1352eb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pipeline.Dockerfile
+4
-0
4 additions, 0 deletions
pipeline.Dockerfile
tests/cloud_playbooks/roles/packet-ci/tasks/create-vms.yml
+7
-8
7 additions, 8 deletions
tests/cloud_playbooks/roles/packet-ci/tasks/create-vms.yml
with
11 additions
and
8 deletions
pipeline.Dockerfile
+
4
−
0
View file @
4ad56e27
...
@@ -45,3 +45,7 @@ RUN wget https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAG
...
@@ -45,3 +45,7 @@ RUN wget https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAG
dpkg
-i
vagrant_
${
VAGRANT_VERSION
}
_x86_64.deb
&&
\
dpkg
-i
vagrant_
${
VAGRANT_VERSION
}
_x86_64.deb
&&
\
rm
vagrant_
${
VAGRANT_VERSION
}
_x86_64.deb
&&
\
rm
vagrant_
${
VAGRANT_VERSION
}
_x86_64.deb
&&
\
vagrant plugin
install
vagrant-libvirt
vagrant plugin
install
vagrant-libvirt
# Install Kubernetes collections
RUN
pip3
install
kubernetes
\
&&
ansible-galaxy collection
install
kubernetes.core
\ No newline at end of file
This diff is collapsed.
Click to expand it.
tests/cloud_playbooks/roles/packet-ci/tasks/create-vms.yml
+
7
−
8
View file @
4ad56e27
...
@@ -11,20 +11,19 @@
...
@@ -11,20 +11,19 @@
mode
:
0755
mode
:
0755
-
name
:
Template vm files for CI job
-
name
:
Template vm files for CI job
template
:
set_fact
:
src
:
"
vm.yml.j2
"
vms_files
:
"
{{
vms_files
}}
+
[{{
lookup('ansible.builtin.template',
'vm.yml.j2')
|
from_yaml
}}]
"
dest
:
"
/tmp/{{
test_name
}}/instance-{{
vm_id
}}.yml"
vars
:
mode
:
0644
vms_files
:
[]
loop
:
"
{{
range(1,
vm_count|int
+
1,
1)
|
list
}}"
loop
:
"
{{
range(1,
vm_count|int
+
1,
1)
|
list
}}"
loop_control
:
loop_control
:
index_var
:
vm_id
index_var
:
vm_id
-
name
:
Start vms for CI job
-
name
:
Start vms for CI job
command
:
"
kubectl
apply
-f
/tmp/{{
test_name
}}/instance-{{
vm_id
}}.yml"
kubernetes.core.k8s
:
definition
:
"
{{
item
}}"
changed_when
:
false
changed_when
:
false
loop
:
"
{{
range(1,
vm_count|int
+
1,
1)
|
list
}}"
loop
:
"
{{
vms_files
}}"
loop_control
:
index_var
:
vm_id
-
name
:
Wait for vms to have ipaddress assigned
-
name
:
Wait for vms to have ipaddress assigned
shell
:
"
set
-o
pipefail
&&
kubectl
get
vmis
-n
{{
test_name
}}
instance-{{
vm_id
}}
-o
json
|
jq
'.status.interfaces[].ipAddress'
|
tr
-d
'
\"
'"
shell
:
"
set
-o
pipefail
&&
kubectl
get
vmis
-n
{{
test_name
}}
instance-{{
vm_id
}}
-o
json
|
jq
'.status.interfaces[].ipAddress'
|
tr
-d
'
\"
'"
...
...
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