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 release cleanup #11

Merged
merged 46 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
11000b1
feat: first draft
vbontempi Jan 31, 2024
e6bd3d7
feat: second draft
vbontempi Feb 1, 2024
79122fd
feat: added script to retrieve and output sample app url
vbontempi Feb 2, 2024
8c807ba
feat: da ibm catalog (#1)
rajatagarwal-ibm Feb 2, 2024
f47c201
feat: added example and test and extension
vbontempi Feb 2, 2024
d49b581
feat: added sleep before reading sampleapp URL
vbontempi Feb 2, 2024
49e6319
Merge branch 'main' of https://github.com/terraform-ibm-modules/terra…
vbontempi Feb 5, 2024
93d761a
feat: adjusted prtest conf
vbontempi Feb 5, 2024
ea2b285
feat: removed subnets from basic test output
vbontempi Feb 5, 2024
39f20f0
fixed: moved basic example to complete folder SKIP UPGRADE TEST
vbontempi Feb 5, 2024
fa9bdee
fix: removed pub gw from complete test cluster
vbontempi Feb 5, 2024
67b7602
feat: added back LBs in complete test
vbontempi Feb 6, 2024
ab1023a
fix: test to validate SCC scan
vbontempi Feb 6, 2024
e32fa0e
feat: reference architecture (#5)
rajatagarwal-ibm Feb 6, 2024
6e41c16
feat: added cleanup hooks and addressed PR comments
vbontempi Feb 6, 2024
1de4d69
Merge branch 'add_liberty_operator_support' of https://github.com/ter…
vbontempi Feb 6, 2024
fcbd7be
fix: fixed description on GH setting
vbontempi Feb 6, 2024
5a8f948
feat: set default images path and version
vbontempi Feb 7, 2024
787e674
fix: PR comments
vbontempi Feb 7, 2024
378e037
test: extension tests (#6)
rajatagarwal-ibm Feb 8, 2024
5842df6
fix: addressing comments of PR
vbontempi Feb 8, 2024
a9635c4
Fix extension tests (#7)
rajatagarwal-ibm Feb 8, 2024
7ef5358
catalog onboarding (#10)
rajatagarwal-ibm Feb 8, 2024
8993651
fix: making SLZ test with public nw access
vbontempi Feb 8, 2024
65f844a
fix: fixed override json
vbontempi Feb 8, 2024
0a4b705
fix: reduced override json to vpc settings only
vbontempi Feb 8, 2024
bc31c82
fix: fixed override json
vbontempi Feb 8, 2024
579742a
fix: setting custom override json
vbontempi Feb 8, 2024
4c7240b
fix: setting reduced override json
vbontempi Feb 8, 2024
c668e71
fix: setting custom override json
vbontempi Feb 8, 2024
1f1f9f4
fix: setting custom override json
vbontempi Feb 8, 2024
cd88fa8
Merge branch 'main' of https://github.com/terraform-ibm-modules/terra…
vbontempi Feb 9, 2024
2826eb9
feat: testing config
vbontempi Feb 9, 2024
5f637b4
fix: some cleanup
vbontempi Feb 9, 2024
bcdeec6
fix: fixed region description in extension
vbontempi Feb 9, 2024
077649c
fix: updated readme.md
vbontempi Feb 9, 2024
19774d4
fix: testing sleep to have RBAC synch
vbontempi Feb 12, 2024
fad6f89
fix: testing kubeconfig in extension
vbontempi Feb 12, 2024
ddb3010
fix: testing kubeconfig in extension
vbontempi Feb 12, 2024
fe5be4d
fix: addressing PR comments
vbontempi Feb 12, 2024
d882b3a
fix: remove internal issue and increased sleep to 5m
vbontempi Feb 12, 2024
70814f6
fix: addressed PR comments
vbontempi Feb 13, 2024
fff8427
fix: fixed error in log format
vbontempi Feb 13, 2024
3fd046a
fix: fixed chart desc
vbontempi Feb 13, 2024
ebc1111
fix: addressed PR comments
vbontempi Feb 13, 2024
bee0719
Update settings.yml
SirSpidey Feb 13, 2024
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
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ For more information about the IBM WebSphere Liberty operator refer to the offic
## Overview
* [terraform-ibm-websphere-liberty-operator](#terraform-ibm-websphere-liberty-operator)
* [Examples](./examples)
* [Complete example](./examples/complete)
* [WebSphere Liberty operator on IBM Cloud Red Hat OpenShift cluster complete example](./examples/complete)
* [Contributing](#contributing)
<!-- END OVERVIEW HOOK -->

Expand Down Expand Up @@ -126,10 +126,8 @@ No modules.
| <a name="input_cluster_config_endpoint_type"></a> [cluster\_config\_endpoint\_type](#input\_cluster\_config\_endpoint\_type) | Specify which type of endpoint to use for for cluster config access: 'default', 'private', 'vpe', 'link'. 'default' value will use the default endpoint of the cluster. | `string` | `"default"` | no |
| <a name="input_cluster_id"></a> [cluster\_id](#input\_cluster\_id) | Id of the target IBM Cloud OpenShift Cluster. | `string` | n/a | yes |
| <a name="input_create_ws_liberty_operator_namespace"></a> [create\_ws\_liberty\_operator\_namespace](#input\_create\_ws\_liberty\_operator\_namespace) | Whether to create the namespace where the IBM WebSphere Liberty operator is deployed. Default is `false`. | `bool` | `false` | no |
| <a name="input_ibmcloud_api_key"></a> [ibmcloud\_api\_key](#input\_ibmcloud\_api\_key) | APIkey that's associated with the account to use. | `string` | `null` | no |
| <a name="input_install_wslo_sampleapp"></a> [install\_wslo\_sampleapp](#input\_install\_wslo\_sampleapp) | Whether to deploy the WebSphere Application Server Liberty sample application. Default is `false`. | `bool` | `false` | no |
| <a name="input_operator_helm_release_namespace"></a> [operator\_helm\_release\_namespace](#input\_operator\_helm\_release\_namespace) | Namespace to deploy the helm releases. Default to liberty-operator-helm-release. | `string` | `"liberty-operator"` | no |
| <a name="input_region"></a> [region](#input\_region) | Cluster region. | `string` | n/a | yes |
| <a name="input_ws_liberty_operator_namespace"></a> [ws\_liberty\_operator\_namespace](#input\_ws\_liberty\_operator\_namespace) | Namespace where the IBM WebSphere Liberty operator is deployed. Default is `openshift-operators`. | `string` | `"openshift-operators"` | no |
| <a name="input_ws_liberty_operator_target_namespace"></a> [ws\_liberty\_operator\_target\_namespace](#input\_ws\_liberty\_operator\_target\_namespace) | Namespace that the the IBM WebSphere Liberty operator watches. Default is `null`, which means that the operator watches all the namespaces. | `string` | `null` | no |
| <a name="input_wslo_sampleapp_name"></a> [wslo\_sampleapp\_name](#input\_wslo\_sampleapp\_name) | Application name to use for the WebSphere Application Server Liberty sample application. | `string` | `"websphereliberty-app-sample"` | no |
Expand Down
6 changes: 3 additions & 3 deletions examples/complete/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Complete example
# WebSphere Liberty operator on IBM Cloud Red Hat OpenShift cluster complete example
vbontempi marked this conversation as resolved.
Show resolved Hide resolved

An end-to-end complete example that will provision the following:
vbontempi marked this conversation as resolved.
Show resolved Hide resolved
- A new resource group if one is not passed in.
- A new VPC with 3 subnets and a new OpenShift cluster in the VPC with 3 workers pools
- A new resource group if one is not passed in
- A new VPC with two subnets and a new OpenShift cluster in the VPC with one workers pool
vbontempi marked this conversation as resolved.
Show resolved Hide resolved
- The IBM WebSphere Liberty operator in the default operator namespace
- The IBM WebSphere Liberty sample app
vbontempi marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 2 additions & 4 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ resource "ibm_is_vpc" "vpc" {

# public gws
resource "ibm_is_public_gateway" "gateway" {
for_each = toset(["1", "2", "3"])
for_each = toset(["1", "2"])
name = "${var.prefix}-gateway-${each.key}"
vpc = ibm_is_vpc.vpc.id
resource_group = module.resource_group.resource_group_id
Expand All @@ -32,7 +32,7 @@ resource "ibm_is_public_gateway" "gateway" {


resource "ibm_is_subnet" "cluster_subnets" {
for_each = toset(["1", "2", "3"])
for_each = toset(["1", "2"])
name = "${var.prefix}-subnet-${each.key}"
vpc = ibm_is_vpc.vpc.id
resource_group = module.resource_group.resource_group_id
Expand Down Expand Up @@ -96,9 +96,7 @@ module "ocp_base" {

module "websphere_liberty_operator" {
source = "../.."
region = var.region
cluster_id = module.ocp_base.cluster_id
create_ws_liberty_operator_namespace = false
install_wslo_sampleapp = true
ibmcloud_api_key = var.ibmcloud_api_key
}
2 changes: 1 addition & 1 deletion extensions/landing-zone/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
### # Client-To-Site VPN extension for landing zone
### WebSphere Liberty operator extension for landing zone

Tutorial: TBD
2 changes: 1 addition & 1 deletion extensions/landing-zone/kubeconfig/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This directory must exist in source control so the `ibm_container_cluster_config` data lookup can use it to place the
vbontempi marked this conversation as resolved.
Show resolved Hide resolved
config.yml used to connect to a kubernetes cluster (See https://github.ibm.com/GoldenEye/issues/issues/552).
config.yml used to connect to a kubernetes cluster.
2 changes: 0 additions & 2 deletions extensions/landing-zone/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ data "ibm_container_cluster_config" "cluster_config" {

module "websphere_liberty_operator" {
source = "../.."
ibmcloud_api_key = var.ibmcloud_api_key
region = var.region
cluster_id = var.cluster_id
add_ibm_operator_catalog = var.add_ibm_operator_catalog
create_ws_liberty_operator_namespace = var.create_ws_liberty_operator_namespace
Expand Down
2 changes: 1 addition & 1 deletion kubeconfig/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This directory must exist in source control so the `ibm_container_cluster_config` data lookup can use it to place the
config.yml used to connect to a kubernetes cluster (See https://github.ibm.com/GoldenEye/issues/issues/552).
config.yml used to connect to a kubernetes cluster.
20 changes: 0 additions & 20 deletions provider.tf

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/confirm-wsloperator-operational.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if [ ${fail} == true ]; then
kubectl describe CatalogSource ibm-operator-catalog -n openshift-marketplace
echo
echo "Describe output of ibm-websphere-liberty Subscription in ${namespace} namespace"
kubectl describe Subscription ibm-websphere-liberty -n "${namespace}" -o wide
kubectl describe Subscription ibm-websphere-liberty -n "${namespace}"
echo
echo "List of ${WSLO_DEPLOYMENT_NAME} deployments in ${namespace} namespace"
kubectl get deployment "${WSLO_DEPLOYMENT_NAME}" -n "${namespace}" -o wide
Expand Down
17 changes: 13 additions & 4 deletions tests/pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,16 @@ func TestRunSLZExample(t *testing.T) {
require.True(t, present, checkVariable+" environment variable not set")
require.NotEqual(t, "", val, checkVariable+" environment variable is empty")

// Programmatically determine region to use based on availability
region, _ := testhelper.GetBestVpcRegion(val, "../common-dev-assets/common-go-assets/cloudinfo-region-vpc-gen2-prefs.yaml", "eu-de")
// Verify region variable is set, otherwise it computes it
region := ""
checkRegion := "TF_VAR_region"
valRegion, presentRegion := os.LookupEnv(checkRegion)
if presentRegion {
region = valRegion
} else {
// Programmatically determine region to use based on availability
region, _ = testhelper.GetBestVpcRegion(val, "../common-dev-assets/common-go-assets/cloudinfo-region-vpc-gen2-prefs.yaml", "eu-de")
}

logger.Log(t, "Tempdir: ", tempTerraformDir)
existingTerraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{
Expand All @@ -88,8 +96,9 @@ func TestRunSLZExample(t *testing.T) {
// Deploy WAS extension
// ------------------------------------------------------------------------------------

fmt.Println("Sleeping for 2 minutes to allow RBAC to sync")
time.Sleep(120 * time.Second)
rbacSynchSleepTime := 180
logger.Log(t, fmt.Sprintf("Sleeping for %d seconds to allow RBAC to sync", rbacSynchSleepTime))
time.Sleep(time.Duration(rbacSynchSleepTime) * time.Second)

options := testhelper.TestOptionsDefault(&testhelper.TestOptions{
Testing: t,
Expand Down
13 changes: 0 additions & 13 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@
# Input Variables
##############################################################################

variable "ibmcloud_api_key" {
description = "APIkey that's associated with the account to use."
type = string
sensitive = true
default = null
}

variable "region" {
description = "Cluster region."
type = string
nullable = false
}

variable "cluster_id" {
type = string
description = "Id of the target IBM Cloud OpenShift Cluster."
Expand Down