IBM / cloud-pak-deployer

Configuration-based installation of OpenShift and Cloud Pak for Data/Integration/Watson AIOps on various private and public cloud infrastructure providers. Deployment attempts to achieve the end-state defined in the configuration. If something fails along the way, you only need to restart the process to continue the deployment.
https://ibm.github.io/cloud-pak-deployer/
Apache License 2.0
132 stars 67 forks source link

Invalid IAM Instance Profile name #544

Closed vincent-imt closed 4 months ago

vincent-imt commented 11 months ago

When creating ocp the 2.0.0 and master release both abort and end with the following error in the *-create-cluster.log

level=debug msg=aws_instance.bootstrap: Still creating... [2m30s elapsed]
level=debug
level=debug msg=Warning: Value for undeclared variable
level=debug
level=debug msg=The root module does not declare a variable named "control_plane_ips" but a
level=debug msg=value was found in file
level=debug msg="/tmp/openshift-install-bootstrap-1444555998/cluster.tfvars.json". If you
level=debug msg=meant to use this value, add a "variable" block to the configuration.
level=debug
level=debug msg=To silence these warnings, use TF_VAR_... environment variables to provide
level=debug msg=certain "global" settings to all configurations in your organization. To
level=debug msg=reduce the verbosity of these warnings, use the -compact-warnings option.
level=error
level=error msg=Error: creating EC2 Instance: InvalidParameterValue: Value (sales-ocp-04-tzpxw-bootstrap-profile) for parameter iamInstanceProfile.name is invalid. Invalid IAM Instance Profile name
level=error msg=        status code: 400, request id: f0ea9e29-77fc-4510-a30d-a32cdf5a648b
level=error
level=error msg=  with aws_instance.bootstrap,
level=error msg=  on main.tf line 146, in resource "aws_instance" "bootstrap":
level=error msg= 146: resource "aws_instance" "bootstrap" {
level=error
level=error msg=failed to fetch Cluster: failed to generate asset "Cluster": failure applying terraform for "bootstrap" stage: failed to create cluster: failed to apply Terraform: exit status 1
level=error
level=error msg=Error: creating EC2 Instance: InvalidParameterValue: Value (sales-ocp-04-tzpxw-bootstrap-profile) for parameter iamInstanceProfile.name is invalid. Invalid IAM Instance Profile name
level=error msg=        status code: 400, request id: f0ea9e29-77fc-4510-a30d-a32cdf5a648b
level=error
level=error msg=  with aws_instance.bootstrap,
level=error msg=  on main.tf line 146, in resource "aws_instance" "bootstrap":
level=error msg= 146: resource "aws_instance" "bootstrap" {
level=error
level=error

Sample ocp self managed sno .yml

---
global_config:
  environment_name: dev
  cloud_platform: aws
  aws_region: us-west-2
  env_id: sales-ocp-03
  confirm_destroy: False

nfs_server:
- name: "{{ env_id }}-elastic"
  infrastructure:
    aws_region: "{{ aws_region }}"

openshift:
- name: "{{ env_id }}"
  ocp_version: 4.12.3
  domain_name: replacewithyour.cloud
  control_plane_flavour: m7i.24xlarge
  control_plane_nodes: 1
  compute_flavour: m7i.24xlarge
  compute_nodes: 0
  infrastructure:
    type: self-managed
    aws_region: "{{ aws_region }}"
    multi_zone: False
  openshift_storage:
  - storage_name: "{{ env_id }}-elastic"
    storage_type: aws-elastic
fketelaars commented 4 months ago

This is due to a limitation of single-node OpenShift. Cannot solve in the deployer.