Commit 4853a9e3 authored by Rustam Lotsmanenko (EPAM)'s avatar Rustam Lotsmanenko (EPAM)
Browse files

GONRG-961 Deploy Delivery into Anthos Service

parent 4c4e7fb5
# Use the official AdoptOpenJDK for a base image.
# https://hub.docker.com/_/openjdk
FROM openjdk:8-slim
WORKDIR /app
COPY target/delivery-reference-0.0.1-SNAPSHOT.jar delivery.jar
# Run the web service on container startup.
CMD java -Djava.security.egd=file:/dev/./urandom -Dserver.port=8080 -jar /app/delivery.jar
apiVersion: v1
data:
GCP_SEARCH_QUERY_URL: ${GCP_SEARCH_QUERY_URL}
GCP_ENTITLEMENTS_URL: ${GCP_ENTITLEMENTS_URL}
MINIO_ENDPOINT_URL : ${MINIO_ENDPOINT_URL}
MINIO_REGION : ${MINIO_REGION}
GCP_REDIS_HOST: ${GCP_REDIS_HOST}
kind: ConfigMap
metadata:
labels:
app: delivery
name: delivery-config
namespace: default
---
apiVersion: apps/v1
kind: Deployment
metadata:
generateName: delivery
labels:
app: delivery
name: delivery
namespace: default
spec:
selector:
matchLabels:
app: delivery
replicas: 1
template:
metadata:
labels:
app: delivery
spec:
containers:
- env:
- name: GCP_SEARCH_QUERY_URL
valueFrom:
configMapKeyRef:
key: GCP_SEARCH_QUERY_URL
name: delivery-config
- name: GCP_ENTITLEMENTS_URL
valueFrom:
configMapKeyRef:
key: GCP_ENTITLEMENTS_URL
name: delivery-config
- name: MINIO_ENDPOINT_URL
valueFrom:
configMapKeyRef:
key: MINIO_ENDPOINT_URL
name: delivery-config
- name: MINIO_REGION
valueFrom:
configMapKeyRef:
key: MINIO_REGION
name: delivery-config
- name: GCP_REDIS_HOST
valueFrom:
configMapKeyRef:
key: GCP_REDIS_HOST
name: delivery-config
- name: MINIO_ACCESS_KEY
valueFrom:
secretKeyRef:
name: delivery-secret
key: minio.access_key
- name: MINIO_SECRET_KEY
valueFrom:
secretKeyRef:
name: delivery-secret
key: minio.secret_key
image: us.gcr.io/osdu-anthos-02/os-delivery/anthos-delivery:latest
name: os-delivery-1-sha256-1
---
apiVersion: v1
kind: Service
metadata:
name: delivery
namespace: default
spec:
ports:
- protocol: TCP
port: 80
targetPort: 8080
selector:
app: delivery
type: LoadBalancer
---
apiVersion: v1
data:
minio.access_key : ${MINIO_ACCESS_KEY}
minio.secret_key : ${MINIO_SECRET_KEY}
kind: Secret
metadata:
name: delivery-secret
namespace: default
type: Opaque
\ No newline at end of file
......@@ -23,7 +23,7 @@
<parent>
<artifactId>os-delivery</artifactId>
<groupId>org.opengroup.osdu</groupId>
<version>0.0.1</version>
<version>0.0.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
......@@ -35,7 +35,7 @@
<dependency>
<groupId>org.opengroup.osdu</groupId>
<artifactId>delivery-core</artifactId>
<version>0.0.1</version>
<version>0.0.2-SNAPSHOT</version>
</dependency>
<!-- Testing packages -->
......
apiVersion: skaffold/v2beta5
kind: Config
metadata:
name: delivery-reference
build:
artifacts:
- image: us.gcr.io/osdu-anthos-02/os-delivery/anthos-delivery
deploy:
kubectl:
manifests:
- kubernetes/deployments/deployment-delivery-service.yml
......@@ -76,6 +76,7 @@ public class StorageServiceImpl implements IStorageService {
@Override
public SignedUrl createSignedUrl(String unsignedUrl, String authorizationToken) {
String[] miPathParts = unsignedUrl.split("s3://");
if (miPathParts.length < 2) {
throw new AppException(HttpStatus.BAD_REQUEST.value(), "Malformed URL", INVALID_MI_PATH_REASON);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment