Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First version of module #3

Merged
merged 31 commits into from
Feb 8, 2024
Merged

First version of module #3

merged 31 commits into from
Feb 8, 2024

Conversation

vbontempi
Copy link
Member

Description

This PR allows the module to deploy the IBM WebSphere Liberty operator into an IBM Cloud Openshift cluster.
It is possible to deploy the operator in all the configurations supported by the operator: OwnNamespace, SingleNamespace, and AllNamespaces (more information available at https://www.ibm.com/docs/en/was-liberty/core?topic=operator-installing-red-hat-openshift-cli)

The module supports also to deploy the Liberty sample app to verify its deployment.

Release required?

  • No release
  • Patch release (x.x.X)
  • Minor release (x.X.x)
  • Major release (X.x.x)
Release notes content

Enable the module to deploy the IBM WebSphere Liberty operator into an IBM Cloud Openshift cluster in all the configurations supported by the operator: OwnNamespace, SingleNamespace, and AllNamespaces (more information available at https://www.ibm.com/docs/en/was-liberty/core?topic=operator-installing-red-hat-openshift-cli)
Support for deploy the Liberty sample app.

Run the pipeline

If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.

Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:

/run pipeline

Checklist for reviewers

  • If relevant, a test for the change is included or updated with this PR.
  • If relevant, documentation for the change is included or updated with this PR.

For mergers

  • Use a conventional commit message to set the release level. Follow the guidelines.
  • Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
  • Use the Squash and merge option.

@vbontempi
Copy link
Member Author

/run pipeline

@vbontempi
Copy link
Member Author

/run pipeline

@vbontempi
Copy link
Member Author

/run pipeline

Copy link
Member

@ocofaigh ocofaigh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vbontempi You should take same approach as we do in https://github.com/terraform-ibm-modules/terraform-ibm-observability-agents/blob/main/main.tf for handling image versions. The module should have a local variable for each image sha, and should be set up with renovate to be updated. Please reach out to me if you have any questions around this approach.

Copy link
Member

@ocofaigh ocofaigh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments but this is a huge PR. I will re-review after the code is updated to handle image versions.

examples/complete/README.md Outdated Show resolved Hide resolved
main.tf Show resolved Hide resolved
scripts/get-sampleapp-url.sh Outdated Show resolved Hide resolved
variables.tf Outdated Show resolved Hide resolved
examples/complete/variables.tf Outdated Show resolved Hide resolved
@vbontempi
Copy link
Member Author

/run pipeline

@vbontempi
Copy link
Member Author

/run pipeline

@rajatagarwal-ibm
Copy link
Member

rajatagarwal-ibm commented Feb 6, 2024

Can you please update the "about" section of the repo in ".github/settings.yml"?

@vbontempi
Copy link
Member Author

/run pipeline

@vbontempi
Copy link
Member Author

/run pipeline

@vbontempi vbontempi marked this pull request as ready for review February 6, 2024 18:03
Copy link
Member

@ocofaigh ocofaigh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SirSpidey We are going to merge as is (if pipeline passes) and follow up with a cleanup for other changes, as we need a release for a demo

ocofaigh
ocofaigh previously approved these changes Feb 8, 2024
Copy link
Member

@ocofaigh ocofaigh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for initial release. Follow up comments can be addressed in #8

@@ -22,7 +22,7 @@ repository:

# Uncomment this description property
# and update the description to the current repo description.
# description: ""
description: "This module installs a WebSphere® Liberty operator and create an instance of WebSphere Liberty operator on IBM Cloud Red Hat OpenShift cluster on VPC Gen2."

# Use a comma-separated list of topics to set on the repo (ensure not to use any caps in the topic string).
topics: terraform, ibm-cloud, terraform-module
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action for follow up PR:

Add these topics: websphere-liberty-operator, core-team

(NOTE: core-team should only be added if our team own this, which may not be the case)

@@ -1,27 +1,27 @@
<!-- Update the title -->
# Terraform Modules Template Project
# WebSphere Liberty operator on Red Hat OpenShift VPC cluster module
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ Action for follow up PR

[![latest release](https://img.shields.io/github/v/release/terraform-ibm-modules/terraform-ibm-websphere-liberty-operator?logo=GitHub&sort=semver)](https://github.com/terraform-ibm-modules/terraform-ibm-websphere-liberty-operator/releases/latest)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

<!-- Add a description of module(s) in this repo -->
TODO: Replace me with description of the module(s) in this repo
Use this module to install a WebSphere® Liberty operator and create an instance of WebSphere Liberty operator on IBM Cloud Red Hat OpenShift cluster on VPC Gen2.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ Action for follow up PR

@@ -0,0 +1,4 @@
{
"ibmcloud_api_key": $VALIDATION_APIKEY,
"cluster_id": $CLUSTER_ID
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action for follow up PR:

this line needs to be removed, as cluster_id is being added in tests/scripts/pre-validation-slz-roks.sh


data "ibm_container_cluster_config" "cluster_config" {
cluster_name_id = var.cluster_id
# config_dir = "../../kubeconfig"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action for follow up PR:

remove comment

variable "region" {
type = string
description = "Region to provision all resources created by this solution"
default = "au-syd"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action for follow up PR:

I would not have any region here, instead make it required input

create_namespace = false
timeout = 300
# dependency_update = true
# force_update = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action for follow up PR:

remove comments

"tests/resources/**"
]
}
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action for follow up PR:

Add a rule to bump ICR image versions (see https://github.com/terraform-ibm-modules/terraform-ibm-observability-agents/blob/main/renovate.json)


# jq reads from stdin
function parse_input() {
eval "$(jq -r '@sh "export KUBECONFIG=\(.KUBECONFIG) APPNAMESPACE=\(.APPNAMESPACE) APPNAME=\(.APPNAME)"')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action for follow up PR:

Clearly document that jq is required in main readme

# shellcheck disable=SC2129
echo "[INFO] using APPNAME ${APPNAME}" >> "${DEBUGFILE}"

SAMPLEAPPROUTE="$(oc get routes "${APPNAME}" -n "${APPNAMESPACE}" --no-headers | awk '{print $2}')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave it for now, but lets revisit

@ocofaigh
Copy link
Member

ocofaigh commented Feb 8, 2024

/run pipeline

ocofaigh
ocofaigh previously approved these changes Feb 8, 2024
@vbontempi
Copy link
Member Author

/run pipeline

@vbontempi
Copy link
Member Author

/run pipeline

@vbontempi
Copy link
Member Author

/run pipeline

@vbontempi
Copy link
Member Author

/run pipeline

@vbontempi
Copy link
Member Author

/run pipeline

@vbontempi
Copy link
Member Author

/run pipeline

@vbontempi
Copy link
Member Author

/run pipeline

@vbontempi
Copy link
Member Author

/run pipeline

@ocofaigh
Copy link
Member

ocofaigh commented Feb 8, 2024

The apply completed successfully on the cluster, but there seemed to be an issue with the subsequent plan:

Error: [0m Error: [ERROR] Error downloading the cluster config [cn2khmaz0n010b7bbv3g]: Request failed with status code: 400, ServerErrorResponse: {"error":"server_error","error_description":"The authorization server encountered an unexpected condition that prevented it from fulfilling the request."}

It may have been a network or backend glitch, but since apply completed, we are going to force merge this in order to continue progress. We will be following this up with a cleanup PR anyway where we can address any issues we find.

@ocofaigh ocofaigh merged commit 3817c01 into main Feb 8, 2024
1 of 2 checks passed
@ocofaigh ocofaigh deleted the add_liberty_operator_support branch February 8, 2024 22:59
@terraform-ibm-modules-ops
Copy link
Contributor

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants