Dockerizing WebSphere Application Server Network Deployment

Ingredients

1. Docker engine (https://docs.docker.com/engine/installation/)

2. IBM Installation Manager binaries downloaded from Passport Advantage:

  • agent.installer.lnx.gtk.x86_64_1.8.5.zip(CND0ZML)

3. IBM WebSphere Application Server traditional Version 9 binaries downloaded from Passport Advantage:

  • WAS_ND_V9.0_MP_ML.zip (CND1LML)

4. IBM SDK Java Technology Edition Version 8 binaries downloaded from Passport Advantage:

  • sdk.repo.8030.java8.hpux.zip (CND18ML)

* This recipe uses Version 9 binaries for creating images, for creating images with different version download the relevant version binaries and update the Dockerfile

* For building WAS Version 8.5.5 images use the supplied Dockerfiles with Version 8.5.5 product binaries

Step-by-step

  1. Clone websphere-traditional GitHub repository

    1. In the browser go to the repository link https://github.com/WASdev/ci.docker.websphere-traditional

    2. Click clone or download button on the right-hand side of the repository and click copy to clipboard button and copy the URL.

    3. Open a terminal in your system and move to the folder where you want to clone the repository.

    4. Type the command `git clone https://github.com/WASdev/ci.docker.websphere-traditional `.

    clone_repo1

    The repository is successfully cloned.

  2. Build IBM WebSphere Application Server Network Deployment prereq image

    IBM WebSphere Application Server Network Deployment images are build using multiple Dockerfile approach. Multiple Dockerfile approach is taken to reduce the image size.

    First, let us build the prereq image, this image installs IBM Installation Manager , IBM WebSphere Application Server Network Deployment Version 9  and IBM WebSphere SDK Java Technology Edition.

    1. Place the downloaded binaries on a remote server. During the build process we will download the image from the remote server and install the products and delete the binaries in a single layer and this helps in reducing the final image size.

    2. Go to the folder where the prereq Dockerfile is available by executing `cd ci.docker.websphere-traditional/network-deployment/install/`

    3. To build the nd prereq image,execute the command `docker build –build-arg URL=ftp://<user>:<password>@<remote hostname/ip>/<folder where the binaries are placed on the remote machine> -t ndv9tar -f Dockerfile.v9.prereq .`

    ndv9_image

    Prereq docker image has been successfully built.

    4. To review the image,execute the command ` docker images ndv9tar `

    ndv9_im

  3. Run a container using the prereq image to create WebSphere Application Server installation tar file

    1. Run a container using the prereq image to get the installation tar by executing the command ` docker run –rm -v $(pwd):/tmp ndv9tar `

    ndv9_tar1.

    .

    ndv9_tar2

    was.tar file is successfully created and placed in the install folder.

    2. To confirm the creation of tar file ,execute the command `ls`

    ndv9_dir

    We will use this tar file and build the install image.

  4. Build IBM WebSphere Application Server Network Deployment install image using the tar file

    1. To build the nd install image, execute the command ` docker build -t nd -f Dockerfile.install . `

    ndv9_install

    Network Deployment image `nd` has been successfully built

    2. To review the image, execute the command  ` docker images nd `

    ndv9_nd

    We are going to use this image as the base image and build deployment manager , custom node and appserver images.

  5. Build deployment manager docker image from nd image

    1. To build the deployment manager image , go to the folder where the Dockerfile is available by executing , cd ../dmgr

    2. List the contents of the folder by executing, ls

    dmgr_ls_1

    3. To build the deployment manager image , execute the command `docker build -t dmgr  . `

    dmgr_i

    Deployment Manager `dmgr` has been successfully built.

    4. To review the image, execute the command `docker images dmgr`

    dmgr_image_1

  6. Build Custom node image from nd image

    1. To build the custom node image , go to the folder where the Dockerfile is available by executing `cd ../custom`

    2. List the contents of the folder by executing  `ls`

    custom_ls

    3. To build the custom node image ,execute the command `docker build -t custom .`

    custom_image

    Custom node image `custom` has been successfully built.

  7. Build Application server image from nd image

    1. To build the application server image, go to the folder where the Dockerfile is available by executing ` cd ../appserver `

    2. List the contents of the folder by executing,`ls`

    appserver_ls_1

    3. To build the application server image , execute the command `docker build -t appserver .`

    appserver_image

    Application Server image `appserver` has been successfully built.

  8. Create docker network

    1. To create a new docker bridge network , execute the command ` docker network create cell-network `

    network1

    2. To confirm the network creation, execute the command ` docker network ls `

    network_ls

  9. Run deployment manager container

    1. To start a deployment manager container , execute the command `docker run –name dmgr -h dmgr –net=cell-network -p 9060:9060 -d dmgr`

    dmgr_image

    2. To review the logs and ensure deployment manager process is started , execute the command ` docker logs -f –tail=all dmgr `

    dmgr_logs

    3. To check the status of container, execute the command ` docker ps -a `

    dmgr_ps

    The deployment manager container `dmgr` is running successfully.

  10. Run custom node container

    1. To start the custom node container , execute the command `docker run –name custom1 -h custom1 –net=cell-network -e PROFILE_NAME=Custom01 -e NODE_NAME=CustomNode01 -e DMGR_HOST=dmgr -e DMGR_PORT=8879 -d custom`

    custom_c

    2. To review the logs and ensure custom node is federated to deployment manager and node agent process is started , execute the command ` docker logs -f –tail=all custom1 `

    custom_c_1

    custom_c_2

    custom_c_3

    3. To check the status of container,execute the command ` docker ps -a `

    custom_ps

    Multiple custom node containers can be started one by one by providing different node names.

    *Do not try to start all the custom node containers parallely , as the custom node in the image is created with node name CustomNode and that is modified after the node is federated to deployment manager and the node with same name cannot be federated to deployment manager.

  11. Run application server container

    1. To start the Application Server container, execute the command `docker run –name server1 -h server1 –net=cell-network -e PROFILE_NAME=AppSrv01 -e NODE_NAME=ServerNode01 -e DMGR_HOST=dmgr -e DMGR_PORT=8879 -d appserver`

    appserver_c

    2. To review the logs and ensure application server node is federated to deployment manager and node agent and server process are started , execute the command ` docker logs -f –tail=all server1 `

    appserver_c_1

    appserver_c_2

    appserver_c_3

    3. To check the status of container,execute the command ` docker ps -a `

    appserver_ps

    Multiple application server containers can be started one by one by providing different node names.

    *Do not try to start all the appserve  containers parallely , as the node in the image is created with node name ServerNode and that is modified after the node is federated to deployment manager and the node with same name cannot be federated to deployment manager.

  12. Access the admin console

    Now we have successfully created a Network Deployment Cell Topology using docker containers, let us review the configuration in admin console

    1. In the browser go to the link http://localhost:9060/ibm/console/login.do

    admin_login

    2. Click System Administration -> Nodes

    ndv9_adm

    You have successfully built IBM WebSphere Application Server Network Deployment images and configured a Cell topology with Deployment Manager , Custom node and Application Server.

Anúncios

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair /  Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair /  Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair /  Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair /  Alterar )

Conectando a %s