From 9a8f67e0635a2927da41c0749d413e52ced9f171 Mon Sep 17 00:00:00 2001 From: ebasso Date: Tue, 2 Jul 2024 14:46:34 -0300 Subject: [PATCH] update documentation --- docs/deploy_ocp_sb2b.md | 87 ++++++++++++++++++++++++--- docs/index.md | 90 ++++++++++++++++++++++++---- playbooks/deploy_sb2b.yml | 7 --- playbooks/deploy_sb2b_prebuiltdb.yml | 10 ++++ 4 files changed, 166 insertions(+), 28 deletions(-) create mode 100644 playbooks/deploy_sb2b_prebuiltdb.yml diff --git a/docs/deploy_ocp_sb2b.md b/docs/deploy_ocp_sb2b.md index 2072349..f5e607a 100644 --- a/docs/deploy_ocp_sb2b.md +++ b/docs/deploy_ocp_sb2b.md @@ -16,7 +16,7 @@ Check with kubectl version ``` -# Deploying +# Deploying Sterling B2B Integrator ## IBM Entitled Registry @@ -42,34 +42,43 @@ oc login --token=sha256~P...k --server=https://c....containers.cloud.xxx.com:312 git clone https://github.com/ibm-sterling-devops/ansible-ibm-sterling.git ``` -## Exporting variables - -To run playbook the playbook +Change directory ```bash cd ansible-ibm-sterling +``` + +## Run playbook the playbook +1) First you need to provide SI_INSTANCEID, this is used to define your environment. Samples: dev01, dev02, poc01, qa01, prod01 + +```bash export SI_INSTANCEID=dev01 +``` + +2) Provide de url domain SI_DOMAIN +```bash export SI_DOMAIN=ocp01-8...74-0000.us-south.containers.appdomain.cloud ``` -Suffix for your environment +You can get this information from your OpenShift console url: | Environment | Sample URL | |--------------|-------------------------------------------------------| | IBM Cloud | ocp01-8...74-0000.us-south.containers.appdomain.cloud | | IBM Techzone | apps.34...6e.cloud.techzone.ibm.com | -(Optional) change your version: +3) (Optional) change your version: + +We always run the last version of Sterling B2Bi, but you can choose to run a different version, based on your RH OpenShift version. ```bash export SI_VERSION=6.2.0.2 ``` -## Run the Plabook +4) To run playbook the playbook -To run playbook the playbook ```bash ansible-playbook playbooks/deploy_sb2b.yml @@ -78,4 +87,64 @@ ansible-playbook playbooks/deploy_sb2b.yml MainPage [README.md](../README.md) -# Advanced options +# Deploy Sterling B2Bi using prebuilt db. + +If your using SB2Bi for a prove of concept and get the environment provided in 10 minutes, i suggest to deploy using prebuilt db. + +** You need to have a backup from a previous install, we cannot provide because of copyright **. + + +1) Define previous environment variables + +```bash +export ENTITLED_REGISTRY_KEY= +export SI_INSTANCEID=dev01 +export SI_DOMAIN=ocp01-8...74-0000.us-south.containers.appdomain.cloud +``` + +2) Provide your Sterling B2BI database backup + +```bash +export SI_PREBUILTDB_FILE=/tmp/B2BI_6202.tar.gz +``` + +3) disable database setup and upgrade + +```bash +export SI_DATASETUP_ENABLED=false +export SI_DATASETUP_UPGRADE=false +``` + +4) Run prebuilt playbook + +```bash +ansible-playbook playbooks/deploy_sb2b_prebuiltdb.yml +``` + +# Environment Variable + +| Environment Variable | Default Value | Required | Description +|------------------------------|-------------------| ---------|-------------------------------------| +| ENTITLED_REGISTRY_KEY | | Y | IBM Entitled Registry key | +| SI_INSTANCEID | | Y | Used to define your environment | +| SI_DOMAIN | | Y | Used to define your environment | +| SI_LICENSETYPE | no-prod | N | Specify the license edition as per license agreement. Valid value is **prod** or **non-prod** for Production and Non-production respectively. Remember that this parameter is crucial for IBM Licensing and Metering Service | +| SI_SYSTEM_PASSPHRASE | passw0rd | N | Name of system passphrase secret if available | +| SI_ADMIN_MAILADDR | admin@company.com | N | Provide the admin email address | +| SI_ADMIN_SMTPHOST | smtp.company.com | N | Provide the SMTP host details | +| SI_DBVENDOR | DB2 | N | Database vendor: DB2, Oracle, MSSQL | +| SI_DBHOST | | N | Database hostname/ip address | +| SI_DBPORT | | N | Database port | +| SI_DBNAME | B2BI | N | Database name | +| SI_DBUSER | db2inst1 | N | Database user | +| SI_DBPASSWORD | passw0rd | N | Database user password | +| SI_ORACLESERVICENAME | false | N | Oracle service name, must be **true** when database is Oracle | +| SI_DATASETUP_ENABLED | true | N | Enable database setup job execution | +| SI_DATASETUP_UPGRADE | false | N | Upgrade an older release | +| SI_JMS_USERNAME | | N | JMS Queue user | +| SI_JMS_PASSWORD | passw0rd | N | JMS Queue user password | +| SI_JMS_KEYSTORE_PASSWORD | | N | JMS Queue keystore password | +| SI_JMS_TRUSTSTORE_PASSWORD | | N | JMS Queue truststore password | +| SI_LIBERTY_KEYSTORE_PASSWORD | changeit | N | Liberty keystore password | +| SI_SKIP_HELM | false | N | Avoid to run helm, only generate values.yaml | + diff --git a/docs/index.md b/docs/index.md index 020de86..521ca19 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,42 +3,108 @@ IBM Sterling Devops Ansible Usage ------------------------------------------------------------------------------- -### Run a playbook + +# Run a playbook The collection includes a number of playbooks that string together multiple roles, you can directly invoke them after installing the collection: -#### To run deploy Connect:Direct -```bash +# Deploying Sterling B2B Integrator + +## IBM Entitled Registry + +You must have **kubectl**, **oc**, **git** and **ansible** installed in your machine + +Log in the [IBM Container software library](https://myibm.ibm.com/products-services/containerlibrary) with the IBMid and password that are associated with the entitled software. Click **Get entitlement key**. With key export variable + +```bash export ENTITLED_REGISTRY_KEY= -export CD_NAMESPACE=sterling-cdnode01-dev -export CD_NODENAME=CDNODE01 +``` + +## Login on OpenShift + +Do a login in Openshift console and run the command: -ansible-playbook playbooks/deploy_cd.yml +```bash +oc login --token=sha256~P...k --server=https://c....containers.cloud.xxx.com:31234 ``` -#### To run deploy Sterling B2Bi +## Cloning ansible-ibm-websphere from git -```bash -export ENTITLED_REGISTRY_KEY= +```bash +git clone https://github.com/ibm-sterling-devops/ansible-ibm-sterling.git +``` + +Change directory + +```bash +cd ansible-ibm-sterling +``` + +## Run playbook the playbook + +1) First you need to provide SI_INSTANCEID, this is used to define your environment. Samples: dev01, dev02, poc01, qa01, prod01 + +```bash export SI_INSTANCEID=dev01 +``` + +2) Provide de url domain SI_DOMAIN + +```bash export SI_DOMAIN=ocp01-8...74-0000.us-south.containers.appdomain.cloud +``` + +You can get this information from your OpenShift console url: + +| Environment | Sample URL | +|--------------|-------------------------------------------------------| +| IBM Cloud | ocp01-8...74-0000.us-south.containers.appdomain.cloud | +| IBM Techzone | apps.34...6e.cloud.techzone.ibm.com | + +3) (Optional) change your version: + +We always run the last version of Sterling B2Bi, but you can choose to run a different version, based on your RH OpenShift version. + +```bash +export SI_VERSION=6.2.0.2 +``` + +4) To run playbook the playbook + + +```bash +ansible-playbook playbooks/deploy_sb2b.yml +``` + + +Local Install for MacOS +------------------------------------------------------------------------------- + +Using Brew to install -ansible-playbook playbooks/deploy_sb2bi.yml +```bash + brew install python3 pip3 ansible ``` -Local Install +Local Install for Linux ------------------------------------------------------------------------------- ### Install Python & Ansible [Python 3.9](https://www.python.org/downloads/) is recommended as it is the most widely used version of Python within our development team, but any in-support 3.x version of Python should work fine. ```bash python3 --version -python3 -m pip install ansible junit_xml xmljson jmespath kubernetes==12.0.1 openshift==0.12.1 +python3 -m pip install ansible junit_xml xmljson jmespath kubernetes openshift ansible --version ansible-playbook --version ``` +Local Install for MS Windows +------------------------------------------------------------------------------- + +```bash + +``` Support ------------------------------------------------------------------------------- diff --git a/playbooks/deploy_sb2b.yml b/playbooks/deploy_sb2b.yml index bc93653..020c874 100644 --- a/playbooks/deploy_sb2b.yml +++ b/playbooks/deploy_sb2b.yml @@ -3,13 +3,6 @@ connection: local gather_facts: false any_errors_fatal: true - # vars: - # db_vendor: DB2 - # db_user: db2inst1 - # db_password: password - # db_host: localhost - # db_port: '50000' - # db_database: B2BI roles: - sb2bi_deploy_db2 - sb2bi_setup_db2 diff --git a/playbooks/deploy_sb2b_prebuiltdb.yml b/playbooks/deploy_sb2b_prebuiltdb.yml new file mode 100644 index 0000000..dc35967 --- /dev/null +++ b/playbooks/deploy_sb2b_prebuiltdb.yml @@ -0,0 +1,10 @@ +- name: Deploy IBM Sterling B2B Integrator on RedHat OpenShift + hosts: localhost + connection: local + gather_facts: false + any_errors_fatal: true + roles: + - sb2bi_deploy_db2 + - sb2bi_prebuiltdb_db2 + - sb2bi_deploy_mq + - sb2bi_deploy