-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
1,895 additions
and
698 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/bin | ||
/dist | ||
.classpath | ||
.project | ||
.settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.