From bc1589301876fb85e8c7e4fb04b7e482debafe9e Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Thu, 25 Aug 2016 11:31:54 -0400 Subject: [PATCH] Installer runs, passes test locally --- Dockerfile | 3 ++- grouper.installer.properties | 36 ++++++++++++++++++++++++++++++++++++ tests/image.bats | 16 ++++++++++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 grouper.installer.properties diff --git a/Dockerfile b/Dockerfile index 8c2c6509..1f4df823 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,8 +30,9 @@ RUN mkdir -p /opt/grouper/$VERSION \ mlocate \ && yum clean all -COPY grouper-install-expect.exp /opt/grouper/$version +COPY grouper.installer.properties /opt/grouper/$version WORKDIR /opt/grouper/$version +RUN java -cp .:grouperInstaller.jar edu.internet2.middleware.grouperInstaller.GrouperInstaller VOLUME /opt/grouper/2.3.0/apache-tomcat-$TOMCAT_VERSION/logs diff --git a/grouper.installer.properties b/grouper.installer.properties new file mode 100644 index 00000000..95876a8c --- /dev/null +++ b/grouper.installer.properties @@ -0,0 +1,36 @@ +# this should be before the version number +download.server.url = http://software.internet2.edu/grouper +# default version to install +grouper.version = 2.3.0 +# print out autorun keys in prompts so you can easily see how to configure the autorun +grouperInstaller.print.autorunKeys = true +# default to install or upgrade (default is install) +grouperInstaller.default.installOrUpgrade = install +# where to get grouper source from, the variable $BRANCH_NAME$ will be substituted for the branch +download.source.url = https://github.com/Internet2/grouper/archive/$BRANCH_NAME$.zip +# where to get grouper psp source from, the variable $BRANCH_NAME$ will be substituted for the branch +download.pspSource.url = https://github.com/Internet2/grouper-psp/archive/$BRANCH_NAME$.zip +############################## +## Autorun properties +## +## If you uncomment one of these properties it will be used as empty, only uncomment to use +## +############################## +#### set this to true to try to use defaults for everything. Only things without default values will need to be set +grouperInstaller.autorun.useDefaultsAsMuchAsAvailable = true +########## AUTORUN PROPERTIES WITH NO DEFAULT OR ARE COMMONLY CHANGED +## Note: not all of them need to be filled out for all operations +# autorun grouper system password (its not secure to have a plain text pass in a config file) +grouperInstaller.autorun.grouperSystemPassword = XXXXXXXXXX +# autorun Enter the database URL +grouperInstaller.autorun.dbUrl = jdbc:mysql://localhost:3306/grouper +# autorun database user +grouperInstaller.autorun.dbUser = grouper +# autorun database pass (note, it is not good security to have plaintext passwords in text config files) +grouperInstaller.autorun.dbPass = XXXXXXXXXX +# autorun Do you want to init the database (delete all existing grouper tables, add new ones) (t|f)? +grouperInstaller.autorun.deleteAndInitDatabase = t +# autorun What is the location of your tomcat server.xml for the UI? +# Note, if you dont use tomcat just leave it blank or type 'blank': +grouperInstaller.autorun.locationOfTomcatServerXml = /home/grouper/2.3.0/apache-tomcat-6.0.35/conf/server.xml + diff --git a/tests/image.bats b/tests/image.bats index 86d52044..4be7160a 100644 --- a/tests/image.bats +++ b/tests/image.bats @@ -4,4 +4,20 @@ load ../common @test "Grouper directory created" { docker run -i $maintainer/$imagename find /opt/grouper/$version +} + +@test "API binary directory created" { + docker run -i $maintainer/$imagename find /opt/grouper/$version/grouper.apiBinary-$version +} + +@test "Client binary directory created" { + docker run -i $maintainer/$imagename find /opt/grouper/$version/grouper.clientBinary-$version +} + +@test "UI directory created" { + docker run -i $maintainer/$imagename find /opt/grouper/$version/grouper.ui-$version +} + +@test "WS directory created" { + docker run -i $maintainer/$imagename find /opt/grouper/$version/grouper.ws-$version } \ No newline at end of file