Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Schema
Commits
2da411d3
Commit
2da411d3
authored
Feb 04, 2021
by
Matt Wise
Browse files
Merge branch 'dev' of codecommit::
us-east-1://os-schema
into dev
parents
b6885b63
a9464e83
Changes
6
Hide whitespace changes
Inline
Side-by-side
provider/schema-aws/build-aws/Dockerfile
View file @
2da411d3
...
...
@@ -16,7 +16,14 @@
FROM
amazoncorretto:8
ARG
JAR_FILE=provider/schema-aws/target/*-spring-boot.jar
#Default to using self signed generated TLS cert
ENV
USE_SELF_SIGNED_SSL_CERT true
WORKDIR
/
COPY
${JAR_FILE} app.jar
COPY
/provider/schema-aws/build-aws/ssl.sh /ssl.sh
COPY
/provider/schema-aws/build-aws/entrypoint.sh /entrypoint.sh
EXPOSE
8080
ENTRYPOINT
java $JAVA_OPTS -jar /app.jar
ENTRYPOINT
["/bin/sh", "-c", ". /entrypoint.sh"]
provider/schema-aws/build-aws/buildspec.yaml
View file @
2da411d3
...
...
@@ -27,6 +27,8 @@ phases:
runtime-versions
:
java
:
corretto8
commands
:
# fix error noted here: https://github.com/yarnpkg/yarn/issues/7866
-
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
-
if [ $(echo $CODEBUILD_SOURCE_VERSION | grep -c ^refs/heads.*) -eq 1 ]; then echo "Branch name found"; else echo "This build only supports branch builds" && exit 1; fi
-
apt-get update -y
-
apt-get install -y maven
...
...
@@ -58,7 +60,7 @@ phases:
-
echo "Building primary service assemblies..."
-
mvn install -N
# required for this service to install the parent pom so that the integration tests will find it
-
mvn -B test install -pl schema-core,provider/schema-aws -Ddeployment.environment=prod
-
mvn -B test install -pl schema-core,provider/schema-aws -Ddeployment.environment=prod
# Suspended until further notice
# - echo "Copying assemblies to dist..."
...
...
provider/schema-aws/build-aws/entrypoint.sh
0 → 100755
View file @
2da411d3
if
[
-n
$USE_SELF_SIGNED_SSL_CERT
]
;
then
export
SSL_KEY_PASSWORD
=
$RANDOM$RANDOM$RANDOM
;
export
SSL_KEY_STORE_PASSWORD
=
$SSL_KEY_PASSWORD
;
export
SSL_KEY_STORE_DIR
=
/tmp/certs
;
export
SSL_KEY_STORE_NAME
=
osduonaws.p12
;
export
SSL_KEY_STORE_PATH
=
$SSL_KEY_STORE_DIR
/
$SSL_KEY_STORE_NAME
;
export
SSL_KEY_ALIAS
=
osduonaws
;
./ssl.sh
;
fi
java
$JAVA_OPTS
-jar
/app.jar
\ No newline at end of file
provider/schema-aws/build-aws/ssl.sh
0 → 100755
View file @
2da411d3
# Copyright © 2021 Amazon Web Services
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#!/usr/bin/env bash
#Future: Support for using Amazon Cert Manager
# if [ "$1" == "webserver" ] && [ -n $ACM_CERTIFICATE_ARN ];
# then
# aws acm export-certificate --certificate-arn $ACM_CERTIFICATE_ARN --passphrase $(echo -n 'aws123' | openssl base64 -e) | jq -r '"\(.PrivateKey)"' > ${SSL_KEY_PATH}.enc
# openssl rsa -in ${SSL_KEY_PATH}.enc -out $SSL_KEY_PATH -passin pass:aws123
# aws acm get-certificate --certificate-arn $ACM_CERTIFICATE_ARN | jq -r '"\(.CertificateChain)"' > $SSL_CERT_PATH
# aws acm get-certificate --certificate-arn $ACM_CERTIFICATE_ARN | jq -r '"\(.Certificate)"' >> $SSL_CERT_PATH
# fi
if
[
-n
$USE_SELF_SIGNED_SSL_CERT
]
;
then
mkdir
-p
$SSL_KEY_STORE_DIR
pushd
$SSL_KEY_STORE_DIR
keytool
-genkeypair
-alias
$SSL_KEY_ALIAS
-keyalg
RSA
-keysize
2048
-storetype
PKCS12
-keystore
$SSL_KEY_STORE_NAME
-validity
3650
-keypass
$SSL_KEY_PASSWORD
-storepass
$SSL_KEY_PASSWORD
-dname
"CN=localhost, OU=AWS, O=Energy, L=Houston, ST=TX, C=US"
popd
fi
provider/schema-aws/src/main/resources/application-unittest.properties
0 → 100644
View file @
2da411d3
# Copyright � 2020 Amazon Web Services
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
server.servlet.context-path
=
/api/schema-service/v1
logging.level.org.springframework.web
=
${LOG_LEVEL:INFO}
server.port
=
${APPLICATION_PORT:8080}
aws.resource.prefix
=
${ENVIRONMENT}
aws.ssm
=
${SSM_ENABLED:True}
AUTHORIZE_API
=
${ENTITLEMENTS_BASE_URL}/api/entitlements/v1
AUTHORIZE_API_KEY
=
LOG_PREFIX
=
schema
# s3 data bucket
aws.s3.endpoint
=
s3.${AWS_REGION}.amazonaws.com
aws.s3.bucket
=
${S3_BUCKET:""}
## AWS DynamoDB configuration
# needed for tenantfactory
aws.dynamodb.key
=
kind
aws.dynamodb.table.prefix
=
${aws.resource.prefix}-
aws.region
=
${AWS_REGION}
aws.dynamodb.endpoint
=
dynamodb.${AWS_REGION}.amazonaws.com
# if this is turned on then the service tries to connect to elastic search
management.health.elasticsearch.enabled
=
false
# Use this property to name your shared tenant name
shared.tenant.name
=
common
server.ssl.enabled
=
false
\ No newline at end of file
provider/schema-aws/src/main/resources/application.properties
View file @
2da411d3
# Copyright 2020 Amazon Web Services
# Copyright
�
2020 Amazon Web Services
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
@@ -39,3 +39,10 @@ management.health.elasticsearch.enabled=false
# Use this property to name your shared tenant name
shared.tenant.name
=
common
server.ssl.enabled
=
${SSL_ENABLED:true}
server.ssl.key-store-type
=
PKCS12
server.ssl.key-store
=
${SSL_KEY_STORE_PATH:/certs/osduonaws.p12}
server.ssl.key-alias
=
${SSL_KEY_ALIAS:osduonaws}
server.ssl.key-password
=
${SSL_KEY_PASSWORD:}
server.ssl.key-store-password
=
${SSL_KEY_STORE_PASSWORD:}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment