Code Monkey home page Code Monkey logo

ansible-websphere's Introduction

README

A set of Ansible modules that lets you manage IBM packages and WebSphere resources

Getting started

Copy the folder library in this repo to your playbook directory or to ANSIBLE_LIBRARY

$ git clone https://github.com/amimof/ansible-websphere && cp -r ansible-websphere/library <directory>

Module Summary

Module Description
ibmim_installer.py Installs and uninstalls IBM Installation Manager.
ibmim.py Manage IBM Installation Manager packages. Currently supports Install/Uninstall and Update packages.
profile_dmgr.py Creates or removes a WebSphere Application Server Deployment Manager or Base profile. Requires a Network Deployment or Base installation.
profile_nodeagent.py Creates or removes a WebSphere Application Server Node Agent profile. Requires a Network Deployment installation.
profile_liberty.py Creates or removes a Liberty Profile server runtime
server.py Start or stops a WebSphere Application Server
liberty_server.py Start or stops a Liberty Profile server

Modules

ibmim_installer.py

This module installs or uninstalls IBM Installation Manager.

Options

Parameter Required Default Choices Comments
state false present present, absent present=install, absent=uninstall
src false N/A N/A Path to installation files for Installation Manager
dest false /opt/IBM/InstallationManager N/A Path to desired installation directory of Installation Manager
logdir false N/A /tmp Directory to save installation log file
accessRights false admin admin, nonAdmin Using a root or a user installation

Example

- name: Install
  ibmim_installer:
    state: present
    src: /some/dir/install/
    logdir: /tmp/im_install.log

- name: Uninstall
  ibmim_installer:
    state: absent
    dest: /opt/IBM/InstallationManager
##
## Install IIM
  - name: IBM Installation Manager installed
    ibmim_installer:
      state: present
      src: /tmp/iimSrc/unpack
      dest: ~/IBM/InstallationManager
      accessRights: nonAdmin
      logdir: /tmp
    become_user: '{{ was_user }}'
##
## Un-Install IIM
  - name: IBM Installation Manager un-installed
    ibmim_installer:
      state: absent
      dest: ~/IBM/InstallationManager
      accessRights: nonAdmin
      logdir: /tmp
    become_user: '{{ was_user }}'

ibmim.py

This module installs, uninstalls or updates IBM packages from local or remote repositories

Options

Parameter Required Default Choices Comments
state false present present, absent, latest present=install,absent=uninstall or latest=update
ibmim false /opt/IBM/InstallationManager N/A Path to installation directory of Installation Manager
dest false N/A N/A Path to destination installation directory
im_shared false N/A N/A Path to Installation Manager shared resources folder
id true N/A N/A ID of the package which you want to install
repositories false N/A N/A Comma separated list of repositories to use. May be a path, URL or both
properties false N/A N/A Comma separated list of properties needed for package installation. In the format key1=value,key2=value
install_fixes false none N/A Install fixes if available in the repositories
connect_passport_advantage false N/A N/A Append the PassportAdvantage repository to the repository list
log false N/A N/A Specify a log file that records the result of Installation Manager operations.

Example

- name: Install WebSphere Application Server Liberty v8
  ibmim:
    name: com.ibm.websphere.liberty.v85
    repositories:
    - http://was-repos/

- name: Uninstall WebSphere Application Server Liberty v8
  ibmim:
    name: com.ibm.websphere.liberty.v85
    state: absent

- name: Update all packages
  ibmim:
    state: latest
    repositories:
    - http://was-repos/

profile_dmgr.py

This module creates or removes a WebSphere Application Server Deployment Manager profile. Requires a Network Deployment installation.

Options

Parameter Required Default Choices Comments
state true present present,absent present=create,absent=remove
wasdir true N/A N/A Path to installation location of WAS
name true N/A N/A Name of the profile
cell_name true N/A N/A Name of the cell
host_name true N/A N/A Host Name
node_name true N/A N/A Node name of this profile
username true N/A N/A Administrative user name
password true N/A N/A Administrative user password
template true management management,default management=dmgr,default=base

Example

- name: Create
  profile_dmgr:
    state: present
    wasdir: /usr/local/WebSphere/AppServer/
    name: dmgr
    cell_name: devCell
    host_name: localhost
    node_name: devcell-dmgr
    username: admin
    password: allyourbasearebelongtous

- name: Remove
  profile_dmgr:
    state: absent
    wasdir: /usr/local/WebSphere/AppServer/
    name: dmgr

profile_nodeagent.py

This module creates or removes a WebSphere Application Server Node Agent profile. Requires a Network Deployment installation.

Options

Parameter Required Default Choices Comments
state true present present,absent present=create,absent=remove
wasdir true N/A N/A Path to installation location of WAS
name true N/A N/A Name of the profile
cell_name true N/A N/A Name of the cell
host_name true N/A N/A Host Name
node_name true N/A N/A Node name of this profile
username true N/A N/A Administrative user name of the deployment manager
password true N/A N/A Administrative user password of the deployment manager
dmgr_host true N/A N/A Host name of the Deployment Manager
dmgr_port true N/A N/A SOAP port number of the Deployment Manager
federate false N/A N/A Wether the node should be federated to a cell. If true, cell name cannot be the same as the cell name of the deployment manager.

Example

- name: Create
  profile_nodeagent:
    state: present
    wasdir: /usr/local/WebSphere/AppServer/
    name: nodeagent
    cell_name: devCellTmp
    host_name: localhost
    node_name: devcell-node1
    username: admin
    password: allyourbasearebelongtous
    dmgr_host: localhost
    dmgr_port: 8879
    federate: true

- name: Remove
  profile_dmgr:
    state: absent
    wasdir: /usr/local/WebSphere/AppServer/
    name: nodeagent

was_server.py

This module start or stops a WebSphere Application Server

Options

Parameter Required Default Choices Comments
state true started started, stopped N/A
name true N/A N/A Name of the app server
wasdir true N/A N/A Path to binary files of the application server
username true N/A N/A Administrative user name
password true N/A N/A Administrative user password

Example

- name: Start
  was_server:
    state: started
    wasdir: /usr/local/WebSphere/AppServer/
    name: my-server-01

- name: Stop
  was_server:
    state: stopped
    wasdir: /usr/local/WebSphere/AppServer/
    name: my-server-01

liberty_server.py

This module start or stops a Liberty Profile server

Options

Parameter Required Default Choices Comments
state true started started, stopped N/A
name true N/A N/A Name of the app server
libertydir true N/A N/A Path to binary files of the application server

Example

- name: Start
  liberty_server:
    state: started
    libertydir: /usr/local/WebSphere/Liberty/
    name: my-server-01

- name: Stop
  liberty_server:
    state: stopped
    libertydir: /usr/local/WebSphere/Liberty/
    name: my-server-01

profile_liberty.py

This module creates or removes a Liberty Profile server runtime

Options

Parameter Required Default Choices Comments
state true present present,absent present=create,absent=remove
libertydir true N/A N/A Path to install location of Liberty Profile binaries
name true N/A N/A Name of the server which is to be created/removed

Example

- name: Create
  profile_liberty:
    state: present
    libertydir: /usr/local/WebSphere/Liberty/
    name: server01

- name: Remove
  profile_liberty:
    state: absent
    libertydir: /usr/local/WebSphere/Liberty/
    name: server01

ansible-websphere's People

Contributors

cakuzo avatar hhue13 avatar skacfjin avatar stoeps13 avatar tajh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-websphere's Issues

Installation Manager upgrade with latest

Hello- Thanks for the modules it is really helpful. Did you get a chance or tried the upgrading the installation Manager version with state: latest ? when i tried ibmim module it is throwing an error saying it is already installed. As per the IBM even for upgrade it is imcl install com.ibm.cic.agent and get version pulling exiting version and not upgrading the latest version.

Idempotence Breaks For WAS 9

The Idempotency checks break for WAS 9. In WAS 9 ND/BASE, IBM now stipulates to install the JDK alongside the WAS repository through Installation Manager.

so:
id: com.ibm.websphere.ND.v90, com.ibm.java.jdk.v8

The idempotency check in the module can only handle 1 package id at a time and therefore the imcl listpackages -long is not parsed correctly, causing the module to install both packages again, even if they are present.

Installing updates -> acceptLicense missing

How can I add the -acceptLicense pattern through a playbook? With properties it seems not to work.
Any hint here? My workaround was to edit ibmim.py and change line 365 to
cmd = ("{0}/eclipse/tools/imcl updateAll -acceptLicense "

Module (was_server) is missing interpreter line

Hi,
I downloaded the ansible-Websphere package into my ansible tower server and tried using the was_server playbook to start my Websphere server but I keep getting the error “module (was_server) is missing interpreter line” despite I’ve already set the ansible_library to the path where the Websphere playbooks are kept
“ANSIBLE_LIBRARY“: “/var/lib/awx/projects/ansible-websphere/library”

I’m very new to ansible, can anyone please tell me how to fix this error?

Thank you.

Not compatible with Python3

When I am installing IBMIM, I am getting following error:

The full traceback is:
Traceback (most recent call last):
  File "/home/ec2-user/.ansible/tmp/ansible-tmp-1619715629.36-10262-81603055390095/AnsiballZ_ibmim.py", line 102, in <module>
    _ansiballz_main()
  File "/home/ec2-user/.ansible/tmp/ansible-tmp-1619715629.36-10262-81603055390095/AnsiballZ_ibmim.py", line 94, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/ec2-user/.ansible/tmp/ansible-tmp-1619715629.36-10262-81603055390095/AnsiballZ_ibmim.py", line 40, in invoke_module
    runpy.run_module(mod_name='ansible.modules.ibmim', init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_ibmim_payload_pgyrj4uj/ansible_ibmim_payload.zip/ansible/modules/ibmim.py", line 361, in <module>
  File "/tmp/ansible_ibmim_payload_pgyrj4uj/ansible_ibmim_payload.zip/ansible/modules/ibmim.py", line 348, in main
  File "/tmp/ansible_ibmim_payload_pgyrj4uj/ansible_ibmim_payload.zip/ansible/modules/ibmim.py", line 221, in install
  File "/tmp/ansible_ibmim_payload_pgyrj4uj/ansible_ibmim_payload.zip/ansible/modules/ibmim.py", line 169, in isProvisioned
  File "/tmp/ansible_ibmim_payload_pgyrj4uj/ansible_ibmim_payload.zip/ansible/modules/ibmim.py", line 199, in getVersion
TypeError: a bytes-like object is required, not 'str'

WAS9?

Hi,

first, thanks for modules! :)

And now to my problem.. I am trying to install WAS9, but I am getting following error:

failed: [was-poc-02] (item=com.ibm.websphere.ND.v90) => {"changed": false, "item": "com.ibm.websphere.ND.v90", "msg": "Failed installing package 'com.ibm.websphere.ND.v90'", "stderr": "CRIMA1270E ERROR: The IBM WebSphere Application Server Network Deployment  package requires the IBM SDK, Java Technology Edition, Version 8 package. Install IBM SDK, Java Technology Edition, Version 8 together with IBM WebSphere Application Server Network Deployment .\n\nExplanation: To function correctly, these packages must be installed together.\n\nUser Action: Add the specified package to your installation. If the package is not available, you might need to add repositories.\n", "stderr_lines": ["CRIMA1270E ERROR: The IBM WebSphere Application Server Network Deployment  package requires the IBM SDK, Java Technology Edition, Version 8 package. Install IBM SDK, Java Technology Edition, Version 8 together with IBM WebSphere Application Server Network Deployment .", "", "Explanation: To function correctly, these packages must be installed together.", "", "User Action: Add the specified package to your installation. If the package is not available, you might need to add repositories."], "stdout": "", "stdout_lines": []}

I saw issue #2, but nobody answered there.. so maybe here? :)

error when starting nodeagent: ADMU0111E: Program exiting with error: java.io.FileNotFoundException:

I installed using profile_nodeagent module and following the example on this repo. I get the following when trying to start:

ADMU0116I: Tool information is being logged in file
/opt/IBM/WebSphere/AppServer/profiles/nodeagent/logs/nodeagent/startServer.log
ADMU0128I: Starting tool with the nodeagent profile
ADMU3100I: Reading configuration for server: nodeagent
ADMU0111E: Program exiting with error: java.io.FileNotFoundException:
/opt/IBM/WebSphere/AppServer/profiles/nodeagent/config/cells/vlxhofmaxd2051NodeCell/nodes/vlxhofmaxd2051-node/servers/nodeagent/server.xml
(No such file or directory)

I suspect I'm doing something wrong, This is on WAS9.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.