Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #287 from Open-MBEE/release/3.3.0-RC2
Browse files Browse the repository at this point in the history
Release/3.3.0 rc2
  • Loading branch information
HuiJun authored Jun 20, 2018
2 parents fc3d23f + c44b64f commit 0628989
Show file tree
Hide file tree
Showing 22 changed files with 374 additions and 263 deletions.
4 changes: 4 additions & 0 deletions .lgtm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
extraction:
javascript:
index:
exclude: mms-ent/share-amp
2 changes: 1 addition & 1 deletion mms-ent/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ RUN addgroup -S tomcat \
&& chown -R tomcat:tomcat ${ALF_DATA_DIR}

# Alfresco
EXPOSE 8080:8080
#EXPOSE 8080:8080
# Postgres
#EXPOSE 5432:5432
# ElasticSearch
Expand Down
23 changes: 6 additions & 17 deletions mms-ent/docker/config/alfresco-global.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
###############################

dir.root=/mnt/alf_data
dir.keystore=${dir.root}/keystore

dir.contentstore=${dir.root}/contentstore
dir.contentstore.deleted=${dir.root}/contentstore.deleted

Expand All @@ -17,19 +15,19 @@ system.content.caching.maxFileSizeMB=0

alfresco.context=alfresco
alfresco.host=localhost
alfresco.port=8443
alfresco.protocol=https
alfresco.port=8080
alfresco.protocol=http

share.context=share
share.host=localhost
share.port=8443
share.protocol=https
share.port=8080
share.protocol=http

### database connection properties ###
db.driver=org.postgresql.Driver
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.username=
db.password=
db.host=
db.port=5432
# probably can up this to same as max connections in db configuration (currently 225)
Expand All @@ -39,15 +37,6 @@ db.pool.validate.query

db.url=jdbc:postgresql://${db.host}:${db.port}/${db.name}


## Install Enterprise license if this is an enterprise host.

## License file pulled from SaltMaster
dir.license.external=/usr/local/tomcat/shared/classes/alfresco/extension/license




# The server mode. Set value here
# # UNKNOWN | TEST | BACKUP | PRODUCTION
system.serverMode=TEST
Expand Down
38 changes: 26 additions & 12 deletions mms-ent/docker/config/set_properties.sh
Original file line number Diff line number Diff line change
@@ -1,33 +1,47 @@
#!/bin/sh

# Configure alfresco-global.properties
# Configure alfresco-global.properties and mms.properties
if [[ -z "$PG_HOST" ]];then
echo "Postgres host not set"
exit 1
else
sed -i'' -e "s/db.host=/db.host=${PG_HOST}/" /usr/local/tomcat/shared/classes/alfresco-global.properties
if [[ -z "$PG_PORT" ]];then
echo "Postgres port not set, using default 5432"
sed -i'' -e "s/pg.host=jdbc:postgresql:\/\/127.0.0.1\//pg.host=jdbc:postgresql:\/\/${PG_HOST}\//" /usr/local/tomcat/shared/classes/mms.properties
else
sed -i'' -e "s/db.port=5432/db.port=${PG_PORT}/" /usr/local/tomcat/shared/classes/alfresco-global.properties
sed -i'' -e "s/pg.host=jdbc:postgresql:\/\/127.0.0.1\//pg.host=jdbc:postgresql:\/\/${PG_HOST}:${PG_PORT}\//" /usr/local/tomcat/shared/classes/mms.properties
fi
fi
if [[ -z "$PG_DB_NAME" ]];then
echo "Postgres Database name not set"
exit 1
else
sed -i'' -e "s/pg.name=/pg.name=${PG_DB_NAME}/" /usr/local/tomcat/shared/classes/mms.properties
fi
if [[ -z "$PG_DB_USER" ]];then
echo "Postgres Database User not set"
exit 1
else
sed -i'' -e "s/db.username=/db.username=${PG_DB_USER}/" /usr/local/tomcat/shared/classes/alfresco-global.properties
sed -i'' -e "s/pg.user=/pg.user=${PG_DB_USER}/" /usr/local/tomcat/shared/classes/mms.properties
fi
if [[ -z "$PG_DB_PASS" ]];then
echo "Postgres Database User password not set"
exit 1
else
sed -i'' -e "s/db.password=/db.password=${PG_DB_PASS}/" /usr/local/tomcat/shared/classes/alfresco-global.properties
sed -i'' -e "s/pg.pass=/pg.pass=${PG_DB_PASS}/" /usr/local/tomcat/shared/classes/mms.properties
fi
if [[ -z "$ES_HOST" ]];then
echo "ElasticSearch host not set"
echo "Elasticsearch host not set"
exit 1
else
if [[ -z "$ES_PORT" ]];then
echo "Elasticsearch port not set, using default 9200"
sed -i'' -e "s/elastic.host=http:\/\/localhost/elastic.host=http:\/\/${ES_HOST}/" /usr/local/tomcat/shared/classes/mms.properties
else
sed -i'' -e "s/elastic.host=http:\/\/localhost:9200/elastic.host=http:\/\/${ES_HOST}:${ES_PORT}/" /usr/local/tomcat/shared/classes/mms.properties
fi
fi

sed -i'' -e "s/db.host=/db.host=${PG_HOST}/" /usr/local/tomcat/shared/classes/alfresco-global.properties

# Configure mms.properties file
sed -i'' -e "s/pg.host=jdbc:postgresql:\/\/127.0.0.1\//pg.host=jdbc:postgresql:\/\/${PG_HOST}\//" /usr/local/tomcat/shared/classes/mms.properties
sed -i'' -e "s/pg.name=/pg.name=${PG_DB_NAME}/" /usr/local/tomcat/shared/classes/mms.properties
sed -i'' -e "s/pg.user=/pg.user=${PG_DB_USER}/" /usr/local/tomcat/shared/classes/mms.properties
sed -i'' -e "s/pg.pass=/pg.pass=${PG_DB_PASS}/" /usr/local/tomcat/shared/classes/mms.properties

sed -i'' -e "s/elastic.host=http:\/\/localhost/elastic.host=http:\/\/${ES_HOST}/" /usr/local/tomcat/shared/classes/mms.properties
2 changes: 1 addition & 1 deletion mms-ent/docs/SingleServerDeploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ See: [Alfresco Documentation on Installation](https://docs.alfresco.com/5.1/conc

## Install Postgresql 9.4.x (Optional if using the Alfresco installer which includes Postgresql)
1. Run the following commands as root:
* `yum -y http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-1.noarch.rpm`
* `yum -y install http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-1.noarch.rpm`
* `yum -y install postgresql94 postgresql94-server postgresql94-contrib postgresql94-libs`
* `systemctl enable postgresql-9.4`
* `$PATH_TO_PG_BIN/postgresql94-setup initdb`
Expand Down
2 changes: 1 addition & 1 deletion mms-ent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>gov.nasa.jpl.mbee</groupId>
<artifactId>mms-ent</artifactId>
<version>3.3.0-RC1</version>
<version>3.3.0-RC2</version>
<name>Alfresco Repository and Share Quickstart with database and an embedded Tomcat runner.</name>
<description>This All-in-One project allows to manage all the components involved in Alfresco development (Repo, Share, Solr4, AMPs) in one project
</description>
Expand Down
2 changes: 1 addition & 1 deletion mms-ent/repo-amp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<groupId>gov.nasa.jpl.mbee</groupId>
<artifactId>mms-ent</artifactId>
<version>3.3.0-RC1</version>
<version>3.3.0-RC2</version>
</parent>

<properties>
Expand Down
38 changes: 36 additions & 2 deletions mms-ent/repo-amp/src/main/amp/web/mms/mms.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ paths:
200:
description: "OK"
schema:
$ref: "#/definitions/Elements"
$ref: "#/definitions/RejectableElements"
401:
$ref: "#/responses/Unauthorized"
403:
Expand Down Expand Up @@ -630,7 +630,7 @@ paths:
200:
description: "OK"
schema:
$ref: "#/definitions/Elements"
$ref: "#/definitions/RejectableElements"
401:
$ref: "#/responses/Unauthorized"
403:
Expand Down Expand Up @@ -1186,6 +1186,23 @@ definitions:
type: "string"
additionalProperties:
type: "object"
Rejection:
type: "object"
required:
- "code"
- "message"
- "severity"
properties:
code:
type: "number"
id:
type: "string"
element:
$ref: "#/definitions/Element"
message:
type: "string"
severity:
type: "string"
Artifact:
type: "object"
required:
Expand Down Expand Up @@ -1255,6 +1272,23 @@ definitions:
type: "string"
source:
type: "string"
RejectableElements:
type: "object"
required:
- "elements"
properties:
elements:
type: "array"
items:
$ref: "#/definitions/Element"
rejected:
type: "array"
items:
$ref: "#/definitions/Rejection"
comment:
type: "string"
source:
type: "string"
Artifacts:
type: "object"
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public interface GraphInterface {

void rollBackToSavepoint(Savepoint savepoint) throws SQLException;

void execUpdate(String query) throws SQLException;
int execUpdate(String query) throws SQLException;

ResultSet execQuery(String query) throws SQLException;

Expand Down
Loading

0 comments on commit 0628989

Please sign in to comment.