Skip to content

How to install BDRE on Bluemix

Sri Harsha Boda edited this page Sep 15, 2017 · 1 revision

STEP 1: Create a Virtual Machine on Bluemix with Ubuntu 14.04. And perform the following steps to make the virtual machine:

a.Click on RUN VIRTUAL MACHINES on the dashboard of Bluemix.

b.Select Ubuntu 14.04 , give the VM Group name , choose VM size as m1.medium and select the .ppk file as security key.

NOTE: If you don’t have .ppk key already, create a key by clicking on add key. Click on CREATE option. Give name and download the key. It will create .pem file.

Go to puttykeygen software and create .ppk file from there. It will give public and private key files. Save both the files on your machine.

Go to Add Key again. In IMPORT option copy the contents of public key created in above step(from column ‘public key for pasting in the file’ ) to column (Public Key to import) on Bluemix and give Key pair name and press OK.

c. Click on CREATE.

Here public IP address of VM : 129.41.141.106

Private IP address of VM : 192.168.0.25

STEP 2: Installing mysql 5.6 on your VM.

a. Go to putty. Load the public IP address of your VM and put the public ssh key (.ppk key created out of .pem file) under .ssh->auth and connect via clicking open.

NOTE: to login make sure that port no 22 is open in wipro network for the specified IP. Else use your free internet.

b.Install mysql on ubuntu using command : sudo apt-get install mysql-server-5.6

If it asks for apt-get update run command : sudo apt-get update

Again run command after getting update : sudo apt-get install mysql-server-5.6

It will ask for the mysql password during the installation. Provide the password.

c. Enter into mysql using command : sudo mysql –u root –p(password)

d. Create a database platmd : create database platmd;

STEP 3: Importing the BDRE tables into VM mysql.

a.Go to mysql workbench and connect to the host mysql as:

hostname: 129.41.141.106

username: root

password: ( as set )

Check the connection.

b. If Connection fails, performthe following steps on VM.

Stop the iptables : sudo service ufw stop

Reset the TERM : sudo export TERM=xterm reset

Open File md.cnf : sudo vi /etc/mysql/my.cnf

Edit the file as:

bind-address = 0.0.0.0 ( Replacing address 127.0.0.1 with 0.0.0.0)

Restart the mysql : sudo /etc/init.d/mysql restart

Check if the port 3306 is listening : netstat –na | grep 3306

Start the iptables: sudo service ufw start

Make iptables to allow port 3306 to listen using command:

/sbin/iptables -A INPUT -i eth0 -s 129.45.141.106 -p tcp --destination-port 3306 -j ACCEPT

c. Check the connection to mysql again. It should be a through this time.

d.Create the tables and procs using metadata_management/mysql/scripts

execute following scripts

sh YourPath\metadata_management\mysql\scripts\create-tables.sh <database_user> <database_password><database_name><databse_server_hostname><database_server_port>

sh yourpath\metadata_management\mysql\scripts\create-procs.sh <database_user> <database_password><database_name><databse_server_hostname><database_server_port>

STEP 4: Getting ear file from gitlab.

Download and install: Git Command line Client (For Windows - GitBash) Download for Windows

Edit Path environment variable: g:/git/bin (path to the git bin)

Important: After installing Git first set your full name (like John Doe) and email id in git config using following command.

git config --global user.name "Your Name"

git config --global user.email "[email protected]"

Replace Your Name and your_email with your real name and Wipro email.

In the metadata_management directory, create a module as “md-ear”. This module will create an EAR file from the given WAR files. Include any WARs to be included in the pom.xml.

Resolve any dependency for context-root (if any).

Run “mvn clean install” on metadata_management directory and the EAR file will be created under md-ear module.

STEP 5: Importing ear file on CF of bluemix.

a. Open cmd.

b. Login into Bluemix using command : cf login

c. Enter the details.

d. Get the cf space using : cf spaces

e. Push the ear app as: cf push appname –p app.ear

Once done you will get following screen.

f. Login into bluemix as : appname.mybluemix.net/mdui/pages/content.page

Clone this wiki locally