Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #12 from ctienshi/master
Browse files Browse the repository at this point in the history
Update Vagrant IS
  • Loading branch information
DilanUA authored Feb 22, 2018
2 parents 6e20bf1 + 3d8b6a7 commit 41e1f87
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 8 deletions.
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,31 @@ for MySQL, [Connector/J](https://dev.mysql.com/downloads/connector/j/5.1.html).

## How to run the Vagrantfile

1. Checkout this repository into your local machine using the following Git command.
1. Follow the instructions in this repository to build the WSO2 Identity Server 5.4.1, WSO2 Identity Server Analytics 5.4.1, and MySQL Vagrant boxes.

```
git clone https://github.com/wso2/vagrant-is.git
https://github.com/wso2/vagrant-boxes
```

2. Move to `vagrant-is` folder.
2. Checkout this repository into your local machine using the following Git command.

```
cd vagrant-is
git clone https://github.com/wso2/vagrant-is.git
```

3. Spawn up the Vagrant setup.
3. Move to `vagrant-is` folder.

```
vagrant up
cd vagrant-is
```
4. Access the Identity Server via the URL given below.

4. Spawn up the Vagrant setup.

```
vagrant up
```
5. Access the Identity Server via the URL given below.

```
https://172.28.128.4:9443/carbon
https://172.28.128.4:9443/carbon
```
27 changes: 27 additions & 0 deletions identity-server-analytics/provisioner/product_provisioner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,37 @@ WSO2_SERVER=wso2is-analytics
WSO2_SERVER_VERSION=5.4.1
WSO2_SERVER_PACK=${WSO2_SERVER}-${WSO2_SERVER_VERSION}*.zip
MYSQL_CONNECTOR=mysql-connector-java-5.1.*-bin.jar
JDK_ARCHIVE=jdk-8u*-linux-x64.tar.gz
WUM_ARCHIVE=wum-1.0-linux-x64.tar.gz
WORKING_DIRECTORY=/home/vagrant
JAVA_HOME=/opt/java/
WUM_HOME=/usr/local
WUM_PATH=PATH=$PATH:/usr/local/wum/bin
DEFAULT_MOUNT=/vagrant
CONFIGURATIONS=${DEFAULT_MOUNT}/identity-server-analytics/confs
NODE_IP=$(/sbin/ifconfig eth1 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')

# install utility software
echo "Installing software utilities."
apt-get install unzip
echo "Successfully installed software utilities."

#setting up Java
echo "Setting up Java."
if test ! -d ${JAVA_HOME}; then
mkdir ${JAVA_HOME};
tar -xf ${WORKING_DIRECTORY}/${JDK_ARCHIVE} -C ${JAVA_HOME} --strip-components=1
echo "Successfully set up Java"
fi

# set up wum
echo "Setting up WUM."
if test ! -d ${WUM_HOME}; then
mkdir ${WUM_HOME};
tar -xf ${WORKING_DIRECTORY}/${WUM_ARCHIVE} -C ${WUM_HOME} --strip-components=1
echo "Successfully set up WUM."
fi

#setting up the server
if test ! -d ${WSO2_SERVER}-${WSO2_SERVER_VERSION}; then
unzip -q ${WORKING_DIRECTORY}/${WSO2_SERVER_PACK} -d ${WORKING_DIRECTORY}
Expand All @@ -45,7 +70,9 @@ cp -a ${CONFIGURATIONS}/repository/components/dropins/. ${WORKING_DIRECTORY}/${W
cp -a ${CONFIGURATIONS}/repository/components/extensions/. ${WORKING_DIRECTORY}/${WSO2_SERVER}-${WSO2_SERVER_VERSION}/repository/components/extensions/
cp -a ${CONFIGURATIONS}/repository/components/lib/. ${WORKING_DIRECTORY}/${WSO2_SERVER}-${WSO2_SERVER_VERSION}/repository/components/lib/
echo "Successfully copied the files."

export JAVA_HOME
export WUM_PATH

# start the WSO2 product pack as a background service
echo "Starting ${WSO2_SERVER}-${WSO2_SERVER_VERSION}..."
Expand Down
22 changes: 22 additions & 0 deletions identity-server/provisioner/product_provisioner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,34 @@
WSO2_SERVER=wso2is
WSO2_SERVER_VERSION=5.4.1
WSO2_SERVER_PACK=${WSO2_SERVER}-${WSO2_SERVER_VERSION}*.zip
WSO2_SERVER_PACK=${WSO2_SERVER}-${WSO2_SERVER_VERSION}*.zip
MYSQL_CONNECTOR=mysql-connector-java-5.1.*-bin.jar
JDK_ARCHIVE=jdk-8u*-linux-x64.tar.gz
WUM_ARCHIVE=wum-1.0-linux-x64.tar.gz
WORKING_DIRECTORY=/home/vagrant
JAVA_HOME=/opt/java/
WUM_HOME=/usr/local
WUM_PATH=PATH=$PATH:/usr/local/wum/bin
DEFAULT_MOUNT=/vagrant
CONFIGURATIONS=${DEFAULT_MOUNT}/identity-server/confs
NODE_IP=$(/sbin/ifconfig eth1 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')

#setting up Java
echo "Setting up Java."
if test ! -d ${JAVA_HOME}; then
mkdir ${JAVA_HOME};
tar -xf ${WORKING_DIRECTORY}/${JDK_ARCHIVE} -C ${JAVA_HOME} --strip-components=1
echo "Successfully set up Java"
fi

# set up wum
echo "Setting up WUM."
if test ! -d ${WUM_HOME}; then
mkdir ${WUM_HOME};
tar -xf ${WORKING_DIRECTORY}/${WUM_ARCHIVE} -C ${WUM_HOME} --strip-components=1
echo "Successfully set up WUM."
fi

#setting up the server
if test ! -d ${WSO2_SERVER}-${WSO2_SERVER_VERSION}; then
unzip -q ${WORKING_DIRECTORY}/${WSO2_SERVER_PACK} -d ${WORKING_DIRECTORY}
Expand All @@ -48,6 +69,7 @@ cp -Tr ${CONFIGURATIONS}/repository/deployment/server/eventpublishers/ ${WORKING
echo "Successfully copied the files."

export JAVA_HOME
export WUM_PATH

# start the WSO2 product pack as a background service
echo "Starting ${WSO2_SERVER}-${WSO2_SERVER_VERSION}..."
Expand Down

0 comments on commit 41e1f87

Please sign in to comment.