Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ebasso committed Jul 2, 2024
1 parent 1d80cc5 commit 9a8f67e
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 28 deletions.
87 changes: 78 additions & 9 deletions docs/deploy_ocp_sb2b.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Check with
kubectl version
```

# Deploying
# Deploying Sterling B2B Integrator

## IBM Entitled Registry

Expand All @@ -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
Expand All @@ -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=<entitlement_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 | [email protected] | 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 | <from service> | N | Database hostname/ip address |
| SI_DBPORT | <from service> | 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 |

90 changes: 78 additions & 12 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<entitlement_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=<entitlement_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
-------------------------------------------------------------------------------
Expand Down
7 changes: 0 additions & 7 deletions playbooks/deploy_sb2b.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions playbooks/deploy_sb2b_prebuiltdb.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9a8f67e

Please sign in to comment.