Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,10 @@

# 4. Deploy the OCP+ cluster
# -----------------------------------------------------------------------------
- name: "fyre : Debug cluster provision json body"
- name: "fyre : Generate cluster provision json body"
when: _hostname_check.available
vars:
fyre_template_name: "templates/fyre/{{ fyre_quota_type }}.json.j2"
debug:
msg: "{{ lookup('template', fyre_template_name) }}"

set_fact:
fyre_payload: "{{ lookup('template', 'templates/fyre/' ~ fyre_quota_type ~ '.json.j2') }}"

# Note: FYRE rate limits this API globally - we are competing with all other FYRE users for limited "slots" to
# provision new OCP+ clusters, when this happens we will see an error like this with a RC of 429:
Expand All @@ -78,17 +75,17 @@
# We will retry for approximately half an hour before giving up.
- name: "fyre : Create new OCP+ cluster"
when: _hostname_check.available
vars:
fyre_template_name: "templates/fyre/{{ fyre_quota_type }}.json.j2"
uri:
url: https://ocpapi.svl.ibm.com/v1/ocp/
user: "{{ fyre_username }}"
password: "{{ fyre_password }}"
method: POST
body: "{{ lookup('template', fyre_template_name) }}"
body: "{{ fyre_payload }}"
force_basic_auth: yes
body_format: json
validate_certs: false
timeout: 300
use_proxy: no
register: _cluster_create
delay: 60 # Every 1 minute
retries: 30
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,39 @@
{
"name": "{{ cluster_name }}",
"description": "{{ fyre_cluster_description }}",
"platform": "{{cluster_platform}}",
"quota_type": "product_group",
"site": "{{ fyre_site }}",
"product_group_id": "{{ fyre_product_id }}",
"ocp_version": "{{ ocp_version }}",
"site": "{{ fyre_site }}",
"ipv6_test": "{{ enable_ipv6 }}",
"haproxy": {
"timeout": {
"http-request": "10s",
"queue": "1m",
"connect": "10s",
"client": "10m",
"server": "10m",
"http-keep-alive": "10s",
"check": "10s"
}
},
"fips":"{{'yes' if ocp_fips_enabled else 'no'}}",
"master": {
"cpu": "4",
"memory": "16"
},
"api": {
"count": "1",
"cpu": "4",
"memory": "8"
},
"worker": [
{
"count": "{{ fyre_worker_count }}",
"cpu": " {{ fyre_worker_cpu }}",
"memory": "{{ fyre_worker_memory }}",
{% if fyre_worker_additional_disks != "" %}
"additional_disk": {{ fyre_worker_additional_disks | split(',') }}
{% endif %}
}
]
}
"name": {{ cluster_name | to_json }},
"description": {{ fyre_cluster_description | to_json }},
"platform": {{ cluster_platform | to_json }},
"quota_type": "product_group",
"site": {{ fyre_site | to_json }},
"product_group_id": {{ fyre_product_id | to_json }},
"ocp_version": {{ ocp_version | to_json }},
"ipv6_test": {{ enable_ipv6 | default(false) | to_json }},
"haproxy": {
"timeout": {
"http-request": "10s",
"queue": "1m",
"connect": "10s",
"client": "10m",
"server": "10m",
"http-keep-alive": "10s",
"check": "10s"
}
},
"fips": {{ ('yes' if ocp_fips_enabled else 'no') | to_json }},
"master": {
"cpu": 4,
"memory": 16
},
"api": {
"count": 1,
"cpu": 4,
"memory": 8
},
"worker": [
{
"count": {{ fyre_worker_count | int | to_json }},
"cpu": {{ fyre_worker_cpu | int | to_json }},
"memory": {{ fyre_worker_memory | int | to_json }}{% if fyre_worker_additional_disks is defined and fyre_worker_additional_disks != "" %},
"additional_disk": {{ (fyre_worker_additional_disks | split(',') | map('trim') | list) | to_json }}{% endif %}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"name": "{{ cluster_name }}",
"description": "{{ fyre_cluster_description }}",
"platform": "{{cluster_platform}}",
"quota_type": "quick_burn",
"time_to_live": "36",
"size":"{{ fyre_cluster_size }}",
"site": "{{ fyre_site }}",
"product_group_id": "{{ fyre_product_id }}",
"ocp_version": "{{ ocp_version }}",
"haproxy": {
"timeout": {
"http-request": "10s",
"queue": "1m",
"connect": "10s",
"client": "10m",
"server": "10m",
"http-keep-alive": "10s",
"check": "10s"
}
},
"fips":"{{'yes' if ocp_fips_enabled else 'no'}}"
}
"name": {{ cluster_name | to_json }},
"description": {{ fyre_cluster_description | to_json }},
"platform": {{ cluster_platform | to_json }},
"quota_type": "quick_burn",
"time_to_live": {{ (36) | to_json }},
"size": {{ (fyre_cluster_size | default("") ) | to_json }},
"site": {{ fyre_site | to_json }},
"product_group_id": {{ fyre_product_id | to_json }},
"ocp_version": {{ ocp_version | to_json }},
"haproxy": {
"timeout": {
"http-request": "10s",
"queue": "1m",
"connect": "10s",
"client": "10m",
"server": "10m",
"http-keep-alive": "10s",
"check": "10s"
}
},
"fips": {{ ('yes' if ocp_fips_enabled else 'no') | to_json }}
}
Loading