Skip to content

Commit

Permalink
Merge branch 'release/1.7.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
iperdomo committed Aug 21, 2014
2 parents e64d1b6 + e396c51 commit 2dba8cc
Show file tree
Hide file tree
Showing 58 changed files with 1,895 additions and 698 deletions.
File renamed without changes.
5 changes: 5 additions & 0 deletions Config/instanceConfigurator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/bin
/dist
.classpath
.project
.settings
65 changes: 65 additions & 0 deletions Config/instanceConfigurator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
## InstanceConfigurator

## Building the JAR file

### Requirements

* JDK 1.7+
* Apache Ant 1.7+
* Git

Just execute `ant` under the `instanceConfigurator` folder.
The resulting _self-contained_ jar will be located in the `dist` folder.


Example of the output

````
$ ant
Buildfile: Config/instanceConfigurator/build.xml
makedir:
makejar:
[javac] Compiling 1 source file to Config/instanceConfigurator/bin
[copy] Copying 5 files to Config/instanceConfigurator/bin
[copy] Copying 13 files to Config/instanceConfigurator/dist
[jar] Building jar: Config/instanceConfigurator/dist/instanceConfigurator-version.jar
BUILD SUCCESSFUL
Total time: 1 second
````
The `version` in the resulting file is the output of [`git describe`](http://git-scm.com/docs/git-describe) command.

## Running the jar

````
java -jar dist/instanceConfigurator-version.jar
Missing required options: on, ak, as, bn, gae, et, o, fs, a
usage: org.akvo.flow.InstanceConfigurator
-a,--alias <arg> Instance alias, e.g. instance.akvoflow.org
-ak,--awsKey <arg> AWS Access Key
-as,--awsSecret <arg> AWS Access Secret
-bn,--bucketName <arg> AWS S3 bucket name
-ef,--emailFrom <arg> Sender email - NOTE: Must be developer in GAE
instance
-et,--emailTo <arg> Recipient email of error notifications
-fs,--flowServices <arg> FLOW Services url, e.g.
http://services.akvoflow.org
-gae,--gaeId <arg> GAE instance id - The `x` in
https://x.appspot.com
-o,--outFolder <arg> Output folder for configuration files
-on,--orgName <arg> Organzation name
```
## NOTES
* The credentials (`--awsKey` `--awsSecret`) are from a [IAM user](https://aws.amazon.com/iam/)
that is allowed to perform IAM and [S3](https://aws.amazon.com/s3/) operations:
* IAM operations: create user, create group, associate user to a group, and associate security policies to a group
* S3 operations: check if a S3 bucket exists, create bucket
59 changes: 59 additions & 0 deletions Config/instanceConfigurator/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="InstanceConfigurator" default="makejar" basedir=".">
<property name="build" value="bin" />
<property name="dist" value="dist" />
<property name="lib" value="lib" />

<path id="project.classpath">
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
</path>

<target name="makedir">
<mkdir dir="${build}" />
<mkdir dir="${dist}" />
</target>

<target name="makejar" depends="makedir">
<javac source="1.7" target="1.7" encoding="UTF-8" srcdir="src" destdir="${build}"
classpathref="project.classpath" debug="on" includeantruntime="false" />

<copy todir="bin">
<fileset dir="src">
<include name="**/*.ftl"/>
</fileset>
</copy>

<copy todir="${dist}">
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
</copy>

<path id="tmp.classpath">
<fileset dir="${dist}">
<include name="**/*.jar" />
</fileset>
</path>

<exec dir="." executable="git" outputproperty="app.version">
<arg value="describe"/>
</exec>

<manifestclasspath property="jar.classpath" jarfile="${dist}/instanceConfigurator-${app.version}.jar">
<classpath refid="tmp.classpath" />
</manifestclasspath>

<jar destfile="${dist}/instanceConfigurator-${app.version}.jar">
<fileset dir="${build}" includes="**/*.*"/>
<fileset dir="${lib}" includes="**/*.jar"/>
<manifest>
<attribute name="Main-Class"
value="org.akvo.flow.InstanceConfigurator"/>
<attribute name="Class-Path"
value="${jar.classpath}"/>
</manifest>
</jar>
</target>
</project>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Config/instanceConfigurator/lib/httpcore-4.2.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Config/instanceConfigurator/lib/stax-1.2.0.jar
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 2dba8cc

Please sign in to comment.