This file contains hidden or 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
| apiVersion: v1 | |
| kind: Secret | |
| metadata: | |
| name: atp-secret | |
| data: | |
| # {"password":"Passw0rd123456"} | |
| password: [base64 encoded JSON object] | |
| # {"walletPassword":"WalletPassw0rd13456"} | |
| walletPassword: [base64 encoded JSON object] |
This file contains hidden or 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
| apiVersion: servicecatalog.k8s.io/v1beta1 | |
| kind: ServiceInstance | |
| metadata: | |
| name: osb-atp-demo-1 | |
| spec: | |
| clusterServiceClassExternalName: atp-service | |
| clusterServicePlanExternalName: standard | |
| parameters: | |
| name: demo-db-1 | |
| compartmentId: ocid1.compartment.oc1... |
This file contains hidden or 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
| apiVersion: servicecatalog.k8s.io/v1beta1 | |
| kind: ServiceBinding | |
| metadata: | |
| name: atp-demo-binding | |
| spec: | |
| instanceRef: | |
| name: osb-atp-demo-1 | |
| parametersFrom: | |
| - secretKeyRef: | |
| name: atp-secret |
This file contains hidden or 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
| apiVersion: v1 | |
| kind: Secret | |
| type: Opaque | |
| metadata: | |
| creationTimestamp: 2018-09-20T19:54:02Z | |
| name: atp-demo-binding | |
| namespace: catalog | |
| resourceVersion: "116279449" | |
| selfLink: /api/v1/namespaces/catalog/secrets/atp-demo-binding | |
| uid: ec556735-bd0e-11e8-9999-0a580aed122c |
This file contains hidden or 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
| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: atp-demo | |
| spec: | |
| replicas: 1 | |
| template: | |
| metadata: | |
| labels: | |
| app: atp-demo |
This file contains hidden or 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
| $ fn create app --annotation oracle.com/oci/subnetIds='["ocid1.subnet.oc1.phx...."]' atp-demo-app |
This file contains hidden or 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
| $ oci db autonomous-data-warehouse generate-wallet --autonomous-data-warehouse-id ocid1.autonomousdatabase.oc1.phx.... --password WalletPassw0rd --file /projects/fn/atp-demo-fn-1/build-resource/wallet.zip |
This file contains hidden or 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
| # create a TAR (from within the JDK 11 init image repo) | |
| $ tar cf jdk-12ea-init.tar func.init.yaml pom.xml src Dockerfile | |
| # build the init-image | |
| $ docker build -f Dockerfile-init -t jdk-12ea-init . | |
| # move back to your project directory, then run: | |
| $ fn init --init-image jdk-12ea-init atp-demo-fn-1 |
This file contains hidden or 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
| FROM maven:3.6.0-jdk-12-alpine as build-stage | |
| WORKDIR /function | |
| ENV MAVEN_OPTS -Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttps.proxyHost= -Dhttps.proxyPort= -Dhttp.nonProxyHosts= -Dmaven.repo.local=/usr/share/maven/ref/repository | |
| ADD pom.xml /function/pom.xml | |
| ADD src /function/src | |
| RUN ["mvn", "package", \ | |
| "dependency:copy-dependencies", \ | |
| "-DincludeScope=runtime", \ | |
| "-Dmdep.prependGroupId=true", \ | |
| "-DoutputDirectory=target" ] |
This file contains hidden or 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
| trsharp@MacBook-Pro-2 ~/Projects/fn/atp-demo-fn-1$ fn deploy --app atp-demo-app 130 ↵ | |
| Deploying atp-demo-fn-1 to app: atp-demo-app | |
| Bumped to version 0.0.4 | |
| Building image phx.ocir.io/toddrsharp/faas/atp-demo-fn-1:0.0.4 | |
| Parts: [phx.ocir.io toddrsharp faas atp-demo-fn-1:0.0.4] | |
| Pushing phx.ocir.io/toddrsharp/faas/atp-demo-fn-1:0.0.4 to docker registry...The push refers to repository [phx.ocir.io/toddrsharp/faas/atp-demo-fn-1] | |
| fa9b3fa6ad13: Layer already exists | |
| 3d90a0036b2c: Layer already exists | |
| d36ad7fe6103: Layer already exists | |
| 918949106598: Layer already exists |