Skip to content

Commit

Permalink
Merge pull request #69 from dejo1307/adding_support_for_oracle
Browse files Browse the repository at this point in the history
Adding support for oracle
  • Loading branch information
sabrina-yee authored Feb 25, 2021
2 parents fbdb9bf + e51ed22 commit 779fc21
Show file tree
Hide file tree
Showing 100 changed files with 3,053 additions and 563 deletions.
63 changes: 41 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Before you start, please be sure to check out [Frequently Asked Questions](https

For HCL Connections 7 dependencies this means that:

* IBM DB2 will be installed, configured as per Performance tunning guide for HCL Connections, and license applied.
* Database will be installed (IBM DB2 or Oracle), configured as per Performance tunning guide for HCL Connections, and license applied.
* HCL Connections Wizard will populate the database with needed schemas and grants.
* If needed for demo or even production purposes, OpenLDAP will be spun up and seeded with some demo users. OpenLDAP will be spun up with SSL enabled, as needed later for setting up IBM WebSphere Application Server properly.
* IBM TDI will be installed, configured, and run to populate profiles database in IBM DB2 with users from OpenLDAP
Expand All @@ -18,7 +18,7 @@ For HCL Connections 7 dependencies this means that:
For HCL Connections 7 itself it means:

* The script will mount NFS shares needed for the shared data and message stores where needed.
* IBM DB2
* Install and configure database (currently IBM DB2 and Oracle are supported)
* HCL Connections 7 will be downloaded and installed. Any type of layout is supported and customizable.
* In LotusConnections-config.xml dynamicHost will be updated.
* Optionaly, Prometheus JMX exported will be enabled for all HCL Connections clusters.
Expand Down Expand Up @@ -95,6 +95,15 @@ drwxr-xr-x. 2 root orion 78 Sep 7 11:31 .
drwxr-xr-x. 13 root orion 192 Nov 18 08:33 ..
-r-xr-xr-x. 1 root orion 737753769 Sep 7 11:02 IBMConnectionsDocs_2.0.1.zip
Oracle:
total 2998572
drwxr-xr-x. 2 root root 96 Feb 22 13:41 .
drwxr-xr-x. 16 root orion 238 Jan 27 14:26 ..
-rwxr--r--. 1 root root 3059705302 Jan 25 15:12 LINUX.X64_193000_db_home.zip
-rw-r--r--. 1 root root 3389454 Feb 22 13:41 ojdbc6.jar
-rw-r--r--. 1 sabrinayee sabrinayee 3397734 Feb 18 21:54 ojdbc7.jar
-rw-r--r--. 1 sabrinayee sabrinayee 4036257 Feb 18 21:54 ojdbc8.jar
TDI:
total 704248
drwxr-xr-x. 2 root orion 70 May 6 2020 .
Expand Down Expand Up @@ -201,11 +210,11 @@ This scenario is useful in multiple cases:
* If you want to spin up a production ready environment that you know will work, see it work, and then start replacing component by component (like switching/adding LDAP servers, switching databases, etc).

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/connections playbooks/setup-connections-complete.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/connections playbooks/setup-connections-complete.yml
```

Running this playbook will:
* Setup DB2 with HCL Connections Wizards on top
* Setup database (IBM DB2 or Oracle) with HCL Connections Wizards on top
* Install OpenLDAP and populate it with a number of fake user, one of them being the HCL Connections admin user
* Set and execute IBM TDI to popule PeopleDB with LDAP users
* Install IBM WebSphere Application Server Network Deployment and IBM HTTP Server and configure it properly
Expand All @@ -218,19 +227,29 @@ You can, of course, run those steps separately.
To install IBM DB2 only, execute:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/connections playbooks/third_party/setup-db2.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/connections playbooks/third_party/setup-db2.yml
```

This will install IBM DB2 on a Linux server, tune the server and IBM DB2 as per Performance tunning guide for HCL Connections, and apply the licence.

In case IBM DB2 was already installed nothing will happen, the scripts will just ensure that everything is as expected.

### Setting up Oracle database

To install Oracle 19c only, execute:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/connections_with_oracle playbooks/third_party/setup-oracle.yml
```

Running this playbook will set up the prerequisites for Oracle 19c (like setting up big enough swap on the node dedicated for Oracle database) but it will also set up the JDBC for HCL Connections and HCL Connections Docs.

### Installing HCL Connections Wizards

This requires IBM DB2 already being set. To create the databases and apply the grants, execute:
This requires the database already being set. To create the databases and apply the grants, execute:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/connections playbooks/hcl/setup-connections-wizards.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/connections playbooks/hcl/setup-connections-wizards.yml
```

If databases already exist, this script will execute runstats and rerogs on all the databases by default on each consecutive run.
Expand All @@ -254,7 +273,7 @@ in your inventory file. This will then drop all the databases and recreate them
To install OpenLDAP with SSL enabled and generate fake users, execute:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/connections playbooks/third_party/setup-ldap.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/connections playbooks/third_party/setup-ldap.yml
```

You can turn on or off creating any of fake users by manipulating:
Expand Down Expand Up @@ -286,7 +305,7 @@ This comes in handy if you don't have any other LDAP server ready and you want t
To install IBM TDI, set up tdisol folder as per documentation, and migrate the users from LDAP to IBM DB2, run:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/connections playbooks/third_party/setup-tdi.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/connections playbooks/third_party/setup-tdi.yml
```

### Installing and configuring IBM WebSphere Application Server only
Expand Down Expand Up @@ -331,7 +350,7 @@ was_password=password
To install IBM WebSphere Application Server, IBM HTTP Server and configure it, execute:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/connections playbooks/third_party/setup-webspherend.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/connections playbooks/third_party/setup-webspherend.yml
```

### Preparing NFS for HCL Connections
Expand All @@ -341,7 +360,7 @@ By default, HCL Connections would use NFS for message stores and shared data. In
If you are going to use NFS with HCL Connections, then set it up first before you proceed with HCL Connections installation with:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/connections playbooks/third_party/setup-nfs.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/connections playbooks/third_party/setup-nfs.yml
```

### Installing HCL Connections
Expand All @@ -355,7 +374,7 @@ skip_nfs_mount_for_connections=true
To install the WebSphere-side of HCL Connections only, on an already prepared environment (all previous steps are already done and the environment is ready for HCL Connections to be installed) execute:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/connections playbooks/hcl/setup-connections-only.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/connections playbooks/hcl/setup-connections-only.yml
```

Note that installation will not start (and will inform you about that) if mandatory variables are missing.
Expand Down Expand Up @@ -392,15 +411,15 @@ ifix_file=LO100079-IC7.0.0.0-Common-Fix.jar
After it, run the iFix installation:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/connections playbooks/hcl/setup-connections-ifix.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/connections playbooks/hcl/setup-connections-ifix.yml
```

### Running post installation tasks

Once your Connections installation is done, run this playbook to set up some post installation bits and pieces needed for Connections 7 on WebSphere:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/connections playbooks/hcl/connections-post-install.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/connections playbooks/hcl/connections-post-install.yml
```

## Setting up Component Pack for HCL Connections 7 with its dependencies
Expand All @@ -410,7 +429,7 @@ To set up Component Pack, you should have the WebSphere-side of Connections alre
To set up Component Pack, execute:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/component_pack playbooks/setup-component-pack-complete.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/component_pack playbooks/setup-component-pack-complete.yml
```

This playbook will:
Expand Down Expand Up @@ -440,7 +459,7 @@ Nginx is used only as an example of a reverse proxy for the WebSphere-side of Co
To install Nginx only, execute:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/component_pack playbooks/third_party/setup-nginx.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/component_pack playbooks/third_party/setup-nginx.yml
```

### Setting up Haproxy
Expand All @@ -456,15 +475,15 @@ main_ssl_port='444'
To install Haproxy only, execute:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/component_pack playbooks/third_party/setup-haproxy.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/component_pack playbooks/third_party/setup-haproxy.yml
```

### Setting up NFS

If you are setting up your own NFS, execute:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/component_pack playbooks/third_party/setup-nfs.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/component_pack playbooks/third_party/setup-nfs.yml
```

This will set up the NFS master, create and export needed folders for Component Pack components, and set up the clients so they can connect to it.
Expand All @@ -483,7 +502,7 @@ This will install docker-ce and configure Docker Registry with SSL enabled, and
To set it up, execute:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/component_pack playbooks/third_party/setup-docker-registry.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/component_pack playbooks/third_party/setup-docker-registry.yml
```

### Setting up Kubernetes
Expand All @@ -495,15 +514,15 @@ This set of automation will install by default 1.18.10 and should be always able
To install Kubernetes, execute:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/component_pack playbooks/third_party/kubernetes/setup-kubernetes.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/component_pack playbooks/third_party/kubernetes/setup-kubernetes.yml
```

#### Setting up kubectl for your user

If the cluster is already created, and you only want to set up kubectl for your own user, just run:

```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/component_pack playbooks/third_party/kubernetes/setup-kubectl.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/component_pack playbooks/third_party/kubernetes/setup-kubectl.yml
```

## Troubleshooting
Expand Down Expand Up @@ -542,7 +561,7 @@ For HCL Connections Docs itself it means:
* HCL Connections has been installed using the Ansible script describe above.
* If HCL Connections was installed with `nfs_docs_setup=false` in the inventory file, set it to `nfs_docs_setup=true` then run the `setup-nfs.yml` playbook again to setup HCL Docs and Viewer data NFS shares:
```
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/component_pack playbooks/third_party/setup-nfs.yml
ansible-playbook -i environments/examples/cnx7/connections_7_with_component_pack/db2/component_pack playbooks/third_party/setup-nfs.yml
```

### Have files ready for download
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ cnx_docs_download_location=http://installer1.internal.example.com:8001/Docs
# Connections 6.5 and Wizards for 6.5 live in Connections6.5 subfolder on
# installer1.internal.example.com:/data/packages/Connections6.5
cnx_repository_url=http://installer1.internal.example.com:8001/Connections6.5
db2_wizards_download_location=http://installer1.internal.example.com:8001/Connections6.5
connections_wizards_download_location=http://installer1.internal.example.com:8001/Connections6.5

# WAS FP 16 fixes live in installer1.internal.example.com:/data/packages/was855FP16
was_fixes_repository_url=http://installer1.internal.example.com:8001/was855FP16
Expand Down Expand Up @@ -99,7 +99,7 @@ cnx_package="HCL_Connections_6.5_lin.tar"
db_version="6.5"

# This variable specifies the package name of Connections Wizards being used to spin up the database.
db2_wizards_package_name="HCL_Connections_6.5_wizards_lin_aix.tar"
connections_wizards_package_name="HCL_Connections_6.5_wizards_lin_aix.tar"

# This variable will let automation figure out specific product ID of the Connections that you are installing. Otherwise,
# if disabled, automation is going to expect explicitely specified version that is being installed. This enables basically # running Connections updates/upgrades as well.
Expand Down
122 changes: 122 additions & 0 deletions environments/examples/cnx6/oracle/component_pack
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Kubernetes masters. First in the group will become primary Kubernetes master, and used later through the scripts as such.
[k8s_masters]
cp1.internal.example.com

# List of all Kubernetes workers. Those workers will be joined to cluster of masters.
[k8s_workers]
cp1worker1.internal.example.com
cp1worker2.internal.example.com

# On this host (those hosts) Helm will be set. By default 3.4.1
[k8s_admin]
cp1.internal.example.com

# If you are setting up Docker Registry, first node on the list will get the registry set, certificates created, and all the rest will trust this certificate
# and be able to docker login to the Registry itself.
[docker_registry]
cp1.internal.example.com
cp1worker1.internal.example.com
cp1worker2.internal.example.com

# If used, this is where your Haproxy lives.
[k8s_load_balancers]
web1.internal.example.com

# Here will all Component Pack installation steps happen. Can be same as K8S master if masters are available, otherwise any host with kubectl and helm
[component_pack_master]
cp1.internal.example.com

# If you are setting NFS as well for your PV(C)s, first server on the list is going to be NFS master. Add all Kubernetes nodes to the list.
[nfs_servers]
cp1.internal.example.com
cp1worker1.internal.example.com
cp1worker2.internal.example.com

# DMGR and WAS nodes are needed for some of installation and post installation steps which include Connections configuration changes.
[dmgr]
connections1.internal.example.com

[was_servers]
connections1.internal.example.com

# This will ensure that Haproxy doesn't clash with Nginx ports when collocated.
[k8s_load_balancers:vars]
main_port='81'
main_ssl_port='444'

# Ensures if you are setting up DR or not. In any case, it will use docker_registry_url as the URL to your Docker Registry.
[docker_registry:vars]
setup_docker_registry=true

[component_pack_master:vars]
# If set to true, number of pods in connections namespace will be scaled to the number of total workers in k8s_workers
enable_pod_auto_scaling=True
# Location and name of Component Pack package
component_pack_download_location="installer1.internal.example.com:8001/cp"
component_pack_package_name="hybridcloud_6501.zip"
# If you are using different domains, this is needed to set up ingresses properly.
ce_on_prem=False
ingress_multi_domain_enabled=true
# If set to true, Ansible will not check if expected pods are in Running state
skip_pod_checks=true

# Variables bellow are enabling only the steps needed (and existing) in Component Pack for 6.5.0.1.
#setup_installation=false
#setup_images=false
#setup_credentials=false
#setup_connections_volumes=false
#setup_psp=false
#setup_bootstrap=false
#setup_connections_env=false
#setup_infrastructure=false
#setup_customizer=false
setup_elasticsearch=True
setup_elasticsearch7=false
setup_teams=false
setup_tailored_exp=false
#setup_ingress=false
#setup_ingress_rule=false
#setup_community_ingress=false
#setup_orientme=false
#setup_dashboards=false
#setup_elasticstack=false
#setup_sanity=false
#setup_kudosboards=false
#setup_prometheus_operator=false
setup_outlook_addin=false
#enable_es_metrics=false
enable_gk_flags=false
setup_ms_teams_extensions=false
#skip_configure_redis=True

[all:vars]
# URL of Docker Registry
docker_registry_url="cp1.internal.example.com:5000"
# Address of Kubernetes load balancer
load_balancer_dns=web1.internal.example.com
# Address of IHS (if one IHS) or DNS name pointing to load balancer pointing to IHSs.
ic_internal="connections1.internal.example.com"
# dynamicHost
frontend_fqdn="web1.example.com"
frontend_domain="example.com"
db_server="db1.internal.example.com"
db_server_user="EMPINST"
db_server_password="password"
# This version was officially announced for CNX 6.5.0.1. If removed, default it 1.18.10
kubernetes_version=1.17.2
calico_install_latest=True
# This is the version we were supporting CNX 6.5.0.1 on. If removed, Helm v3 (3.4.1) would be installed.
helm_version=2.16.3

# Those variables are needed for installation and postinstallation tasks
dmgr_hostname="connections1.internal.example.com"
was_username=wasadmin
was_password=password
connections_auto_start_clusters='App'

# This needs to match the same variable in your connections inventory file. This will instruct the automation what to map when setting up Prometheus
# and Grafana (controlled with setup_prometheus_operator)
connections_jmx_clusters=[{"name":"App","port":"8080"}]

# This is only for development and playing purposes! This will remove Kubernetes fully from k8s_masters and k8s_workers, including Helm, Docker Registry, NFS folders.
force_destroy_kubernetes=True
Loading

0 comments on commit 779fc21

Please sign in to comment.