Skip to content

Commit

Permalink
Documentum Server Patch install
Browse files Browse the repository at this point in the history
  • Loading branch information
lastnitescurry committed Sep 21, 2018
1 parent ea12d7b commit 482e56a
Show file tree
Hide file tree
Showing 9 changed files with 142 additions and 67 deletions.
115 changes: 58 additions & 57 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,57 +1,58 @@
*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/
/tmp/

# Used by dotenv library to load environment variables.
# .env

## Specific to RubyMotion:
.dat*
.repl_history
build/
*.bridgesupport
build-iPhoneOS/
build-iPhoneSimulator/

## Specific to RubyMotion (use of CocoaPods):
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# vendor/Pods/

## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/

## Environment normalization:
/.bundle/
/vendor/bundle
/lib/bundler/man/

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc

# Vagrant
.vagrant

# Backups
*- Copy*
*.bak*
*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/
/tmp/

# Used by dotenv library to load environment variables.
# .env

## Specific to RubyMotion:
.dat*
.repl_history
build/
*.bridgesupport
build-iPhoneOS/
build-iPhoneSimulator/

## Specific to RubyMotion (use of CocoaPods):
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# vendor/Pods/

## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/

## Environment normalization:
/.bundle/
/vendor/bundle
/lib/bundler/man/

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc

# Vagrant
.vagrant

# Backups
*- Copy*
*.bak*
/credentials/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Documentum 16.4 on Centos
#### WORKAROUND Vagrant problem. Prevent hostname from binding to the loopback address
- https://github.com/hashicorp/vagrant/issues/7263

sudo -i

sed -i '1d' /etc/hosts

and setup SSH
Expand Down
5 changes: 4 additions & 1 deletion hosts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ all:
group: dmadmin
gid: 5000
media:
tmp: /tmp
installer: /tmp/documentum_server
zip: /media/software/Documentum/D164/content_server_16.4_linux64_oracle.tar
patch:
installer: /tmp/documentum_server_patch
zip: /media/software/Documentum/D164/CS_16.4.0040.0057_linux_ora_P04.tar.gz
zip_file: CS_16.4.0040.0057_linux_ora.tar.gz
jms:
port: 9090
dir: /opt/documentum/wildfly9.0.1/server/DctmServer_MethodServer
Expand Down
2 changes: 1 addition & 1 deletion playbook.retry
Original file line number Diff line number Diff line change
@@ -1 +1 @@
documentum
database
2 changes: 2 additions & 0 deletions roles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ To get started following: Ansible - A Beginner's Tutorial
- https://www.youtube.com/watch?v=aeGDc7rCK_0

### SSH
- https://stackoverflow.com/questions/39275038/auto-answer-ssh-copy-id-in-shell-script

#### Generate
ssh-keygen -q -t ecdsa -b 521 -f ~/.ssh/id_ecdsa -N ""

Expand Down
10 changes: 10 additions & 0 deletions roles/documentum_server/files/serverPatch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export LC_ALL=C
export HOME=/home/dmadmin
export DOCUMENTUM={{ documentum_server.documentum }}
export DOCUMENTUM_SHARED={{ documentum_server.dctm_shared }}
export DM_HOME={{ documentum_server.dm_home }}
export KEEP_TEMP_FILE=true

cd {{ documentum_server.patch.installer }}
chmod u+x {{ documentum_server.patch.installer }}/patch.bin
{{ documentum_server.patch.installer }}/patch.bin LAX_VM {{ documentum_server.dctm_shared }}/java64/JAVA_LINK/bin/java -r response.properties -i Silent -DUSER_SELECTED_PATCH_ZIP_FILE={{ documentum_server.patch.zip_file }}
29 changes: 28 additions & 1 deletion roles/documentum_server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
- "{{ documentum_server.dctm_shared }}"
- "{{ documentum_server.dm_home }}"
- "{{ documentum_server.media.installer }}"
- "{{ documentum_server.patch.installer }}"

- name: Documentum Server pre-installation tasks for Red Hat Enterprise Linux
file:
Expand All @@ -59,7 +60,7 @@
group: root
mode: u=rw,g=r,o=r

- name: Unpack Documentum media
- name: Unpack Documentum Server media
unarchive:
src: "{{ documentum_server.media.zip }}"
dest: "{{ documentum_server.media.installer }}"
Expand All @@ -84,3 +85,29 @@
executable: /bin/bash
chdir: "{{ documentum_server.media.installer }}"
creates: "{{ documentum_server.dm_home }}/version.txt"

- name: Unpack Documentum Server Patch media
unarchive:
src: "{{ documentum_server.patch.zip }}"
dest: "{{ documentum_server.patch.installer }}"
creates: "{{ documentum_server.patch.installer }}/patch.bin"
remote_src: yes
owner: "{{ documentum_server.user }}"
group: "{{ documentum_server.group }}"

- name: Setup script to install Documentum Server Patch
template:
dest: "{{ documentum_server.patch.installer }}/patch.sh"
src: ../files/serverPatch.sh
owner: "{{ documentum_server.user }}"
group: "{{ documentum_server.group }}"
mode: u=rwx,g=r,o=r

- name: Install Documentum Server Patch
shell: "{{ documentum_server.patch.installer }}/patch.sh"
become: true
become_user: dmadmin
args:
executable: /bin/bash
chdir: "{{ documentum_server.patch.installer }}"
creates: "{{ documentum_server.dm_home }}/version.txt"
13 changes: 13 additions & 0 deletions roles/oracle_server/files/runInstaller.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export ORACLE_HOSTNAME={{ ansible_hostname }}
export ORACLE_UNQNAME={{ oracle.unqname }}
export ORACLE_BASE={{ oracle.base }}
export ORACLE_HOME={{ oracle.home }}
export ORACLE_SID={{ oracle.sid }}
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

cd {{ oracle.media.installer }}
chmod u+x {{ oracle.media.installer }}/runInstaller
{{ oracle.media.installer }}/runInstaller -silent -responseFile {{ oracle.media.installer }}/db_install.rsp -waitforcompletion > {{ oracle.media.installer }}/runInstaller.log


31 changes: 24 additions & 7 deletions roles/oracle_server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,30 @@
group: "{{ oracle.groups.inventory }}"
mode: u=rw,g=r,o=r

- name: Run the Oracle 12c installer
shell: "{{ oracle.media.installer }}/runInstaller -silent -responseFile {{ oracle.media.installer }}/db_install.rsp -waitforcompletion"
args:
chdir: "{{ oracle.media.installer }}"
creates: "{{ oracle.home }}/root.sh"
become: true
become_user: oracle
#- name: Run the Oracle 12c installer
# shell: "{{ oracle.media.installer }}/runInstaller -silent -responseFile {{ oracle.media.installer }}/db_install.rsp -waitforcompletion"
# args:
# chdir: "{{ oracle.media.installer }}"
# creates: "{{ oracle.home }}/root.sh"
# become: true
# become_user: oracle

- name: Setup script to install Oracle 12c Server software
template:
dest: "{{ oracle.media.installer }}/runInstaller.sh"
src: ../files/runInstaller.sh
owner: "{{ oracle.user }}"
group: "{{ oracle.groups.inventory }}"
mode: u=rwx,g=r,o=r

# FIXME handle none zero exit code due to failed requirements. Install is good
#- name: Run the Oracle 12c installer
# shell: "{{ oracle.media.installer }}/runInstaller.sh"
# args:
# chdir: "{{ oracle.media.installer }}"
# creates: "{{ oracle.home }}/root.sh"
# become: true
# become_user: oracle

- name: Run the Oracle 12c post install root task
shell: "{{ oracle.home }}/root.sh"
Expand Down

0 comments on commit 482e56a

Please sign in to comment.