Installing and building custom components
- Bundles available in cpbm--customization.git are:
- Bundle citrix.cpbm.custom.model
- Bundle citrix.cpbm.custom.portal
- Bundle citrix.cpbm.custom.common
- Bundle available in cpbm--ccp-connector-ui.git is:
- Bundle cloud.cloudplatform.fragment
Any customer or service provider who is interested in customizing these components can follow the steps given below.
Pre-requisites for setting up the development setup:
- GIT client: GIT downloads are available at http://git-scm.com/downloads and install instructions are available at http://git-scm.com/book/en/Getting-Started-Installing-Git.
- Maven 3.0.x Stable Version: Maven downloads and install instructions are available at http://maven.apache.org/download.cgi.
- JDK 7: JDK downloads and install instructions are available at http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html.
Setting up remote and local GIT repositories:
- Download the latest CloudPortal Business Manager customization repositories tar ball:
cpbm--customization.git.tar.gz
- Unzip the customization tar ball:
$ tar xvf cpbm--customization.git.tar.gz
This will be a bare GIT repository which you will use only to pull changes. For example, call it pristine-cpbm-customization repo.
- Create another bare repository from the above repository which will be your customer specific repository where you will pull and push changes on daily basis: (Let us call it xyz-cpbm-customization):
$ git clone --bare xyz-cpbm-customization
- Create a working directory on your development environment (Let us call it 'Workspace'), change directory to 'Workspace':
cd
- Clone a normal repository from customer specific repository (created in Step 3, xyz-cpbm-customization):
$ git clone
This will create a working directory with name .
- Change directory to the one created in previous step:
cd xyz-cpbm-customization
- Add the pristine-cpbm-customization as a remote into the repository on the development instance. For example, call it pristine-remote:
$ git remote add pristine-remote
- Create and check out a local development branch:
$ git checkout -b tag--GA
- Example: To create and check out a new branch at tag for CPBM-2.5.0 release, use the command given below:
$ git checkout -b tag-2.5.0-GA
-
Note: By creating a new branch at the tag of the CPBM release, you make sure that you are developing at the correct version of the customization SDK.
- Example: To create and check out a new branch at tag for CPBM-2.5.0 release, use the command given below:
- Make required changes in any of the custom projects. Commit your changes and push them into your customer specific repository:
$ git push origin
Merging existing customization with new version CPBM customization
Once you have set up the repositories as shown above, follow the steps given below whenever a new version of cpbm-customization repo is released:
- Untar the customization tar ball into the existing pristine-cpbm-customization repository:
$ tar xvf cpbm--customization.git.tar.gz -C
- From your local development repository, fetch changes from pristine-remote:
$ cd /
$ git fetch pristine-remote
- Check out the local development branch where you intend to merge latest changes:
$ git checkout
- Merge the release tag into your development branch:
$ git merge tag-
Example: $ git merge tag-2.5.0-GA
- Push your changes into customer specific repository after resolving conflicts (if any):
$ git push origin
Steps to generate custom jar files:
- Make required changes in any of the custom projects. Commit your changes and push them into your customer specific repository:
$ git push origin
- Before compiling the code, you need to clean your mvn repo for vmops and Accelerite by using the following command:
rm -rf /.m2/repository/vmops/*
rm -rf /.m2/repository/citrix/*
- Build the citrix.cpbm.custom.all project (without running tests):
mvn clean install -Dmaven.test.skip=true
- Above command will create the custom jars under target directory of respective projects.
Running Test Cases
- cloud_portal_test
- cloud_reports_test
- cloud_test
- cloud_usage_test
You can use command given below to run tests:
mvn clean test
Steps to deploy updated custom jar files:
- Stop the CloudPortal Business Manager server using the command:
$ service cloud-portal stop
- Go to /usr/share/vts3/config.
- Open org.eclipse.virgo.repository.properties.
- Comment the following lines:
default_impls.type=watched default_impls.watchDirectory=default_impls
- Uncomment the following lines:
custom_impls.type=watched custom_impls.watchDirectory=custom_impls
- Modify the line to have custom_impls instead of default_impls
chain=ext,patches,usr,connectors,connectors_ext,default_impls,prop
withchain=ext,custom_impls,patches,usr,connectors,connectors_ext,prop
Note: Do not modify the jars under the default_impls directory. - Copy the updated custom jars from target directory of all four custom projects to:
/usr/share/vts3/custom_impls
- Start the CloudPortal Business Manager server using the command:
$ service cloud-portal start
Customizing the Accelerite CloudPlatform Connector UI
- Setting up remote and local GIT repositories:
- Download the latest CloudPortal Business Manager Accelerite CloudPlatform Connector UI repository tar ball:
cpbm--ccp-connector-ui.git.tar.gz
- Unzip the Accelerite CloudPlatform UI tar ball:
$ tar xvf cpbm--ccp-connector-ui.git.tar.gz
- This will be a bare GIT repository, which you will use only to pull changes. For example, call it pristine-cpbm-ccp-connector-ui repo. Create another bare repository from the above repository which will be your customer specific repository where you will pull and push changes on daily basis:
$ git clone --bare xyz-cpbm-ccp-connector-ui
- Create a working directory on your development environment (Let us call it 'Workspace'), change directory to 'Workspace':
cd
- Clone a normal repository with working directory from customer specific repository on development environment:
$ git clone
- Change directory:
cd xyz-cpbm-ccp-connector-ui
- Add the pristine-cpbm-ccp-connector-ui as a remote into the repository on development instance. For example, call it pristine-remote:
$ git remote add pristine-remote
- Create and checkout a local development branch:
$ git checkout -b tag--GA
- Example: To create and checkout a new branch at tag for CPBM-2.5.0 release, use the command given below:
$ git checkout -b tag-2.5.0-GA
-
Note: By creating a new branch at the tag of the CPBM release, you make sure that you are developing at the correct version of the customization SDK.
- Example: To create and checkout a new branch at tag for CPBM-2.5.0 release, use the command given below:
- Download the latest CloudPortal Business Manager Accelerite CloudPlatform Connector UI repository tar ball:
- Once you have set up the repositories as shown above, follow the steps given below whenever a new version of cpbm-ccp-connector-ui repo is released:
- Untar the customization tar ball into the existing pristine-cpbm-ccp-connector-ui repository (run the command on the remote repository):
$ tar xvf cpbm--ccp-connector-ui.git.tar.gz -C
- From your local development repository, fetch the pristine-remote:
$ git fetch pristine-remote
- Check out the local development branch where you intend to merge latest changes:
git checkout
- Merge the release tag on pristine-remote into local master:
$ git merge tag-
Example:
$ git merge tag-2.5.0-GA
- Push your changes into customer specific repository after resolving conflicts (if any):
$ git push origin
- Untar the customization tar ball into the existing pristine-cpbm-ccp-connector-ui repository (run the command on the remote repository):
- Steps to generate custom jar files:
- Make the required changes in bundle cloud.cloudplatform.fragment.
- Commit your changes and push them into your customer specific repository.
- Build the cloud.cloudplatform.fragment project (without running tests):
$ mvn clean install -Dmaven.test.skip=true
- Above command will create the custom jar under the:
cloud.cloudplatform.fragment/target directory
- To run the tests, you must create all tests schemas, as shown below, into your MySQL database.
- cloud_portal_test
- cloud_reports_test
- cloud_test
- cloud_usage_test
You can use command given below to run tests:
$ mvn clean test
- Steps to deploy updated custom jar files:
- Stop the CloudPortal Business Manager server using the command:
$ service cloud-portal stop
- Go to /usr/share/vts3/config.
- Open org.eclipse.virgo.repository.properties.
- Add the following lines after
"connectors_ext.watchDirectory=connectors_ext":
custom_connectors.type=watched custom_connectors.watchDirectory=custom_connectors
- Modify the chain to have custom_connectors included:
chain=ext,custom_connectors,patches,usr,connectors,connectors_ext,default_impls,propNote: Do not modify the jars under the connectors directory.
- Copy the updated custom jars from target directory of custom project to:
/usr/share/vts3/custom_connectors
- Copy dependent bundles from /usr/share/vts3/connectors to /usr/share/vts3/custom_connectors. Dependent bundles are:
- cloud.cloudplatform
- cloud.apachecloudstack
- cloud.apachecloudstack.fragment
Note: If you customize the Accelerite CloudPlatform Connector UI (cloud.cloudplatform.fragment bundle), then you must use the same version of all the dependent versions. This means that you cannot have one version of Accelerite CloudPlatform Connector UI and higher version of dependent bundles. - Start the CloudPortal Business Manager server using the command:
$ service cloud-portal start
- Stop the CloudPortal Business Manager server using the command:
Comments