Skip to content

Commit

Permalink
Merge pull request #52 from indigo-dc/develop
Browse files Browse the repository at this point in the history
Integrate 1st release features (partial)
  • Loading branch information
alberto-brigandi authored Jun 16, 2016
2 parents 5a6fcf3 + 8024938 commit 9bbca22
Show file tree
Hide file tree
Showing 122 changed files with 9,466 additions and 742 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ You can find the REST APIs docs [orchestrator-rest-doc] (http://indigo-dc.github
This project has been created with maven 3.3.3 and Java 1.8. Maven will take care of downloading the extra dependencies needed for the project but this project dependes on [im-java-api](https://github.com/indigo-dc/im-java-api) and [workflow-manager](https://github.com/ConceptReplyIT/workflow-manager) too.
To run the Orchestrator you need [Docker](https://www.docker.com) and a MySQL Server instance (which may be local, remote, or in a docker container). See next section to have details.

1.1.1 MySQL
-----------

The MySQL server needs the following customized settings (use `my.cnf` file to edit those settings):
- `max_allowed_packet = 256M`

1.2 INSTALLING
--------------

Expand All @@ -31,7 +37,14 @@ To compile the project you need to be in the same folder as the `pom.xml` file a
mvn clean install
```
This command compiles the code and creates a war package, `orchestrator.war`, which will be put inside the `docker` folder.

If you want run only unit-test type:
```
mvn test
```
otherwise if you want run integration test type (or use surefire.skip=true property to skip unit tests)
```
mvn integration-test
```
### Build the Docker image

You can build the docker image with the command
Expand Down Expand Up @@ -84,3 +97,6 @@ Besides those used to link the orchestrator to the DBs, there are other environm
3. `OIDC_CLIENT_ID`: The OAuth2 client ID
4. `OIDC_CLIENT_SECRET` The OAuth2 client secret
### Configure Chronos
1. `CHRONOS_AUTH_FILE_PATH`: the path to the property file containing credentials for Chronos and OneData service space for Chronos.
You can also edit the file `chronos/chronos.properties` directly in the deployment folder.
2 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ ENV IM_URL="" \
OPENNEBULA_AUTH_FILE_PATH="" \
OPENSTACK_AUTH_FILE_PATH="" \
ONEDOCK_AUTH_FILE_PATH=""

ENV CHRONOS_AUTH_FILE_PATH=""

ENV SECURITY_ENABLE="" \
OIDC_ISSUERS="" \
Expand Down
28 changes: 28 additions & 0 deletions docker/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ java -jar /usr/share/java/saxon.jar -o:$JBOSS_HOME/standalone/configuration/$JBO

IM_PROP_FILE="$JBOSS_HOME/standalone/deployments/$WAR_NAME.war/WEB-INF/classes/im-config/im-java-api.properties"
SECURITY_PROP_FILE="$JBOSS_HOME/standalone/deployments/$WAR_NAME.war/WEB-INF/classes/security.properties"
CHRONOS_PROP_FILE="$JBOSS_HOME/standalone/deployments/$WAR_NAME.war/WEB-INF/classes/chronos/chronos.properties"
CMDB_PROP_FILE="$JBOSS_HOME/standalone/deployments/$WAR_NAME.war/WEB-INF/classes/cmdb/cmdb.properties"
SLAM_PROP_FILE="$JBOSS_HOME/standalone/deployments/$WAR_NAME.war/WEB-INF/classes/slam/slam.properties"
CPR_PROP_FILE="$JBOSS_HOME/standalone/deployments/$WAR_NAME.war/WEB-INF/classes/cloud-provider-ranker/cloud-provider-ranker.properties"

if [[ $IM_URL ]];
then sed -i "s/^\(url=\).*$/\1$(echo $IM_URL | sed -e 's/[\/&]/\\&/g')/" ${IM_PROP_FILE};
Expand All @@ -31,6 +35,30 @@ if [[ $ONEDOCK_AUTH_FILE_PATH ]];
then sed -i "s/^\(onedock\.auth\.file\.path=\).*$/\1$(echo $ONEDOCK_AUTH_FILE_PATH | sed -e 's/[\/&]/\\&/g')/" ${IM_PROP_FILE};
fi;

if [[ $CHRONOS_ENDPOINT ]];
then sed -i "s/^\(chronos\.endpoint=\).*$/\1$(echo $CHRONOS_ENDPOINT | sed -e 's/[\/&]/\\&/g')/" ${CHRONOS_PROP_FILE};
fi;

if [[ $CHRONOS_USERNAME ]];
then sed -i "s/^\(chronos\.username=\).*$/\1$(echo $CHRONOS_USERNAME | sed -e 's/[\/&]/\\&/g')/" ${CHRONOS_PROP_FILE};
fi;

if [[ $CHRONOS_PASSWORD ]];
then sed -i "s/^\(chronos\.password=\).*$/\1$(echo $CHRONOS_PASSWORD | sed -e 's/[\/&]/\\&/g')/" ${CHRONOS_PROP_FILE};
fi;

if [[ $CMDB_ENDPOINT ]];
then sed -i "s/^\(cmdb\.url=\).*$/\1$(echo $CMDB_ENDPOINT | sed -e 's/[\/&]/\\&/g')/" ${CMDB_PROP_FILE};
fi;

if [[ $SLAM_ENDPOINT ]];
then sed -i "s/^\(slam\.url=\).*$/\1$(echo $SLAM_ENDPOINT | sed -e 's/[\/&]/\\&/g')/" ${SLAM_PROP_FILE};
fi;

if [[ $CPR_ENDPOINT ]];
then sed -i "s/^\(cloud-provider-ranker\.url=\).*$/\1$(echo $CPR_ENDPOINT | sed -e 's/[\/&]/\\&/g')/" ${CPR_PROP_FILE};
fi;

# CUSTOMIZE SECURITY PROPERTIES
if [ $SECURITY_ENABLE = "true"];
then sed -i "s/^\(security\.enabled=\).*$/\1$(echo 'true' | sed -e 's/[\/&]/\\&/g')/" ${SECURITY_PROP_FILE};
Expand Down
Loading

0 comments on commit 9bbca22

Please sign in to comment.