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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
0f231f0e
Commit
0f231f0e
authored
7 years ago
by
Matthew Mosesohn
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Improve method to create and wait for gce instances (#1645)
parent
5d99fa09
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/cloud_playbooks/create-gce.yml
+11
-3
11 additions, 3 deletions
tests/cloud_playbooks/create-gce.yml
tests/testcases/010_check-apiserver.yml
+1
-1
1 addition, 1 deletion
tests/testcases/010_check-apiserver.yml
with
12 additions
and
4 deletions
tests/cloud_playbooks/create-gce.yml
+
11
−
3
View file @
0f231f0e
...
...
@@ -34,6 +34,10 @@
tags
:
"
build-{{test_name}},{{kube_network_plugin}}"
register
:
gce
-
name
:
Add instances to host group
add_host
:
hostname={{item.name}} ansible_host={{item.public_ip}} groupname="waitfor_hosts"
with_items
:
'
{{gce.instance_data}}'
-
name
:
Template the inventory
template
:
src
:
../templates/inventory-gce.j2
...
...
@@ -51,6 +55,10 @@
dest
:
"
{{
inventory_path|dirname
}}/group_vars/fake_hosts.yml"
when
:
mode in ['scale', 'separate-scale', 'ha-scale']
-
name
:
Wait for SSH to come up
wait_for
:
host={{item.public_ip}} port=22 delay=30 timeout=180 state=started
with_items
:
"
{{gce.instance_data}}"
-
name
:
Wait for instances
hosts
:
"
waitfor_hosts"
gather_facts
:
false
tasks
:
-
name
:
Wait for SSH to come up.
local_action
:
wait_for host={{inventory_hostname}} port=22 delay=5 timeout=240 state=started
This diff is collapsed.
Click to expand it.
tests/testcases/010_check-apiserver.yml
+
1
−
1
View file @
0f231f0e
...
...
@@ -6,6 +6,6 @@
uri
:
url
:
"
https://{{
access_ip
|
default(ansible_default_ipv4.address)
}}:{{
kube_apiserver_port
}}/api/v1"
user
:
kube
password
:
"
{{
lookup('password',
'../../credentials/kube_user
length=15')
}}"
password
:
"
{{
lookup('password',
'../../credentials/kube_user
length=15
chars=ascii_letters,digits
')
}}"
validate_certs
:
no
status_code
:
200
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