Skip to content

Commit

Permalink
Issue11 (#13)
Browse files Browse the repository at this point in the history
* Issue11 and lint fixes

* add testinfra test

* oraclexe install fixes

* syntax fix and unmodified prepare.yml test

* Remove unnecessary Ansible env vars

Signed-off-by: Timur Gadiev <[email protected]>
  • Loading branch information
ignatovich-artem authored and tgadiev committed Apr 24, 2019
1 parent 76c6a1d commit fb03368
Show file tree
Hide file tree
Showing 50 changed files with 747 additions and 714 deletions.
23 changes: 13 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ stages:
- deployment test

before_script:
- rm -rf molecule/resources/provisioning
- ansible --version
- ansible-lint --version
- molecule --version
- git clone https://github.com/lean-delivery/ansible-molecule-drivers.git molecule/resources/provisioning

variables:
GET_SOURCES_ATTEMPTS: "5"
Expand All @@ -19,57 +22,57 @@ Ansible lint:
after_script:
- rm -rf ~/ansible-lint-rules
tags:
- delegated
- aws


Docker Oracle DB 12:
stage: deployment test
script:
- molecule test -s docker-oracle-12
tags:
- docker
- aws

Docker Oracle DB 11:
stage: deployment test
script:
- molecule test -s docker-oracle-11
tags:
- docker
- aws

Docker Oracle DB XE:
stage: deployment test
script:
- molecule test -s docker-oracle-xe
tags:
- docker
- aws


AWS Oracle DB 12:
variables:
EPC_REGION: AWS-EUCENTRAL
AWS_REGION: us-east-1
stage: deployment test
script:
- molecule test -s cloud-aws-oracle-12-delegated
tags:
- delegated
- aws

AWS Oracle DB 11:
variables:
EPC_REGION: AWS-EUCENTRAL
AWS_REGION: us-east-1
stage: deployment test
script:
- molecule test -s cloud-aws-oracle-11-delegated
tags:
- delegated
- aws

AWS Oracle DB XE:
variables:
EPC_REGION: AWS-EUCENTRAL
AWS_REGION: us-east-1
stage: deployment test
script:
- molecule test -s cloud-aws-oracle-xe-delegated
tags:
- delegated
- aws


EPC Oracle DB 11:
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ services:
- docker

before_install:
- git clone -b ${lint_version} https://github.com/lean-delivery/ansible-lint-rules.git ~/ansible-lint-rules
- git clone https://github.com/lean-delivery/ansible-lint-rules.git ~/ansible-lint-rules

install:
- pip install --upgrade ansible==2.5.* docker-py molecule==2.17 pyOpenSSL PyYAML pytest==3.7.4
- pip install --upgrade ansible==2.5.* docker-py molecule==2.20 pyOpenSSL PyYAML pytest
- pip install git+https://github.com/ansible/ansible-lint.git
- ansible --version
- ansible-lint --version
Expand Down
150 changes: 83 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Oracle Database role
====================
[![License](https://img.shields.io/badge/license-Apache-green.svg?style=flat)](https://raw.githubusercontent.com/lean-delivery/ansible-role-oracle-db/master/LICENSE)
[![Build Status](https://travis-ci.org/lean-delivery/ansible-role-oracle-db.svg?branch=master)](https://travis-ci.org/lean-delivery/ansible-role-oracle-db)
[![Build Status](https://gitlab.com/lean-delivery/ansible-role-oracle-db/badges/master/build.svg)](https://gitlab.com/lean-delivery/ansible-role-oracle-db)
[![Build Status](https://gitlab.com/lean-delivery/ansible-role-oracle-db/badges/master/build.svg)](https://gitlab.com/lean-delivery/ansible-role-oracle-db/pipelines)
[![Galaxy](https://img.shields.io/badge/galaxy-lean__delivery.oracle__db-blue.svg)](https://galaxy.ansible.com/lean_delivery/oracle_db)
![Ansible](https://img.shields.io/ansible/role/d/35592.svg)
![Ansible](https://img.shields.io/badge/dynamic/json.svg?label=min_ansible_version&url=https%3A%2F%2Fgalaxy.ansible.com%2Fapi%2Fv1%2Froles%2F35592%2F&query=$.min_ansible_version)
Expand Down Expand Up @@ -70,29 +70,45 @@ If you want change size you swap file, please use variable `oracle_db_swap_count
Role Variables
--------------

- `oracle_version` - major number of Oracle Database version *default*: `12`
- `patch_version` - number of Oracle Database version with patch *default*: `12.1.0.2`
- `transport` - artifact source transport. Use **web**, **local** for more predictable result *default*: `web`
- `oracle_version` - major number of Oracle Database version
*default*: `12`
- `patch_version` - number of Oracle Database version with patch
*default*: `12.1.0.2`
- `transport` - artifact source transport. Use **web**, **local** for more predictable result
*default*: `web`
Available:
- `web` Fetching artifact from custom web uri
- `local` Local artifact
- `transport_web` - URI for http/https artifact e.g *default*: `"http://my-storage.example.com"`
- `transport_local` - path for local artifact *default*: `"/tmp"`
- `oracle_images` - list of Oracle Database files *default*:
- ` - "linuxamd64_12102_database_1of2.zip"`
- ` - "linuxamd64_12102_database_2of2.zip"`
- `oracle_base` - oracle base installation directory *default*: `"/opt/oracledb"`
- `unqname` - database unique name *default*: `"orcl"`
- `sid` - instance unique identifier *default*: `"orcl"`
- `db_user` - database user *default*: `"oracle"`
- `db_tablespace` - mandatory tablespace of the data dictionary *default*: `"oracle"`
- `db_port` - database port *default*: `1521`
- `oracle_db_swap_count` - swap file size *default*: role identify a swap file size
- `oracle_db_swapfile` - path to swap file *default* `"/oracle-swapfile"`
- `transport_web` - URI for http/https artifact e.g
*default*: `http://my-storage.example.com`
- `transport_local` - path for local artifact
*default*: `/tmp`
- `oracle_images` - list of Oracle Database files
default*:
- ` - linuxamd64_12102_database_1of2.zip`
- ` - linuxamd64_12102_database_2of2.zip`
- `oracle_base` - oracle base installation directory
*default*: `/opt/oracledb`
- `unqname` - database unique name
*default*: `orcl`
- `sid` - instance unique identifier
*default*: `orcl`
- `db_user` - database user
*default*: `oracle`
- `db_tablespace` - mandatory tablespace of the data dictionary
*default*: `oracle`
- `db_port` - database port
*default*: `1521`
- `oracle_db_swap_count` - swap file size
*default*: role identify a swap file size
- `oracle_db_swapfile` - path to swap file
*default* `/oracle-swapfile`
- `db_startup_timeout` - startup timeout for systemd service
*default* `300`

- **For Oracle Universal Installer**
- `inventory_directory` *default* `"/opt/oraInventory"`
- `ora_inst` *default*`"/etc/oraInst.loc"`
- `inventory_directory` *default* `/opt/oraInventory`
- `ora_inst` *default*`/etc/oraInst.loc`

- **Password for administrative accounts**

Expand All @@ -110,111 +126,111 @@ Role Variables

- **Default password for administrative accounts Oracle 11, XE versions**
```yaml
syspass: "SysPassOracle2017SecretToken"
syspassword: "SysPassword2017SecretToken"
systempassword: "SystemPassword2017SecretToken"
sysmanpassword: "SysmanPassword2017SecretToken"
dbsnmppassword: "DbSnmpPassword2017SecretToken"
db_user_password: "DbPassword2017SecretToken" (for created DB schema)
syspass: SysPassOracle2017SecretToken
syspassword: SysPassword2017SecretToken
systempassword: SystemPassword2017SecretToken
sysmanpassword: SysmanPassword2017SecretToken
dbsnmppassword: DbSnmpPassword2017SecretToken
db_user_password: DbPassword2017SecretToken (for created DB schema)
```
- **Default password for administrative accounts Oracle 12 version**
```yaml
syspass: "SysPassOracle2017SecretToken"
syspassword: "SysPassword2017SecretToken"
systempassword: "SystemPassword2017SecretToken"
dbsnmppassword: "DbSnmpPassword2017SecretToken"
pdbadminpassword: "PdbAdminPassword2017SecretToken"
db_user_password: "DbPassword2017SecretToken" (for created DB schema)
syspass: SysPassOracle2017SecretToken
syspassword: SysPassword2017SecretToken
systempassword: SystemPassword2017SecretToken
dbsnmppassword: DbSnmpPassword2017SecretToken
pdbadminpassword: PdbAdminPassword2017SecretToken
db_user_password: DbPassword2017SecretToken (for created DB schema)
```
Example Playbook
----------------
- Installing Oracle 11.2.0.1
```yaml
- name: "Install oracle db"
- name: Install oracle db
hosts: all

roles:
- role: "lean_delivery.oracle_db"
- role: lean_delivery.oracle_db
oracle_version: 11
patch_version: 11.2.0.1
transport_web: "http://my-storage.example.com"
transport_web: http://my-storage.example.com
oracle_images:
- "linux.x64_11gR2_database_1of2.zip"
- "linux.x64_11gR2_database_2of2.zip"
- linux.x64_11gR2_database_1of2.zip
- linux.x64_11gR2_database_2of2.zip
```
- Installing Oracle 11.2.0.3 from local files
```yaml
- name: "Install oracle db"
- name: Install oracle db
hosts: all

roles:
- role: "lean_delivery.oracle_db"
- role: lean_delivery.oracle_db
oracle_version: 11
patch_version: 11.2.0.3
transport: "local"
transport_local: "/tmp"
transport: local
transport_local: /tmp
oracle_images:
- "p10404530_112030_Linux-x86-64_1of7.zip"
- "p10404530_112030_Linux-x86-64_2of7.zip"
- "p10404530_112030_Linux-x86-64_3of7.zip"
- "p10404530_112030_Linux-x86-64_4of7.zip"
- "p10404530_112030_Linux-x86-64_5of7.zip"
- "p10404530_112030_Linux-x86-64_6of7.zip"
- "p10404530_112030_Linux-x86-64_7of7.zip"
- p10404530_112030_Linux-x86-64_1of7.zip
- p10404530_112030_Linux-x86-64_2of7.zip
- p10404530_112030_Linux-x86-64_3of7.zip
- p10404530_112030_Linux-x86-64_4of7.zip
- p10404530_112030_Linux-x86-64_5of7.zip
- p10404530_112030_Linux-x86-64_6of7.zip
- p10404530_112030_Linux-x86-64_7of7.zip
```
- Installing Oracle 11.2.0.4 with custom swap file size
```yaml
- name: "Install oracle db"
- name: Install oracle db
hosts: all

roles:
- role: "lean_delivery.oracle_db"
- role: lean_delivery.oracle_db
oracle_version: 11
patch_version: 11.2.0.4
transport_web: "http://my-storage.example.com"
transport_web: http://my-storage.example.com
oracle_images:
- "p10404530_112040_Linux-x86-64_1of7.zip"
- "p10404530_112040_Linux-x86-64_2of7.zip"
- "p10404530_112040_Linux-x86-64_3of7.zip"
- "p10404530_112040_Linux-x86-64_4of7.zip"
- "p10404530_112040_Linux-x86-64_5of7.zip"
- "p10404530_112040_Linux-x86-64_6of7.zip"
- "p10404530_112040_Linux-x86-64_7of7.zip"
oracle_db_swapfile: "/oracle-swapfile-11"
- p10404530_112040_Linux-x86-64_1of7.zip
- p10404530_112040_Linux-x86-64_2of7.zip
- p10404530_112040_Linux-x86-64_3of7.zip
- p10404530_112040_Linux-x86-64_4of7.zip
- p10404530_112040_Linux-x86-64_5of7.zip
- p10404530_112040_Linux-x86-64_6of7.zip
- p10404530_112040_Linux-x86-64_7of7.zip
oracle_db_swapfile: /oracle-swapfile-11
oracle_db_swap_count: 2048
```
- Installing Oracle 12.1.0.2
```yaml
- name: "Install oracle db"
- name: Install oracle db
hosts: all

roles:
- role: "lean_delivery.oracle_db"
- role: lean_delivery.oracle_db
oracle_version: 12
patch_version: 12.1.0.2
transport_web: "http://my-storage.example.com"
transport_web: http://my-storage.example.com
oracle_images:
- "linuxamd64_12102_database_1of2.zip"
- "linuxamd64_12102_database_2of2.zip"
- linuxamd64_12102_database_1of2.zip
- linuxamd64_12102_database_2of2.zip
```
- Installing Oracle XE
```yaml
- name: "Install oracle db"
- name: Install oracle db
hosts: all

roles:
- role: "lean_delivery.oracle_db"
- role: lean_delivery.oracle_db
oracle_version: xe
transport_web: "http://my-storage.example.com"
transport_web: http://my-storage.example.com
oracle_images:
- "linux.x64_11gR2_xe.zip"
- linux.x64_11gR2_xe.zip
```
License
Expand Down
Loading

0 comments on commit fb03368

Please sign in to comment.