This file contains 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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] | |
pull_request: |
This file contains 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
- name: 'Deploy the API on OKE' | |
run: | | |
kubectl delete deployment $DEPLOYMENT_NAME | |
kubectl create deployment $DEPLOYMENT_NAME --image=$IMAGE_NAME --dry-run -o yaml > deployment.yaml | |
kubectl apply -f deployment.yaml | |
kubectl rollout status deployment/$DEPLOYMENT_NAME | |
kubectl create service loadbalancer $DEPLOYMENT_NAME --tcp=80:$PORT --dry-run -o yaml > service.yaml | |
kubectl apply -f service.yaml | |
kubectl get services -o wide |
This file contains 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
- name: 'Download the KUBECONFIG' | |
run: | | |
mkdir -p ~/.kube | |
oci ce cluster create-kubeconfig --cluster-id ${{ secrets.OKE_OCID }} --file ~/.kube/config --region ${{secrets.OCI_REGION}} --token-version 2.0.0 | |
export KUBECONFIG=~/.kube/config |
This file contains 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
- name: 'Fix Config File Permissions' | |
run: | | |
oci setup repair-file-permissions --file /home/runner/.oci/config | |
oci setup repair-file-permissions --file /home/runner/.oci/key.pem |
This file contains 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
- name: 'Install OCI CLI' | |
run: | | |
curl -L -O https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh | |
chmod +x install.sh | |
./install.sh --accept-all-defaults | |
echo "::add-path::/home/runner/bin" | |
exec -l $SHELL |
This file contains 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
- name: 'Write Config & Key Files' | |
run: | | |
mkdir ~/.oci | |
echo "[DEFAULT]" >> ~/.oci/config | |
echo "user=${{secrets.OCI_USER_OCID}}" >> ~/.oci/config | |
echo "fingerprint=${{secrets.OCI_FINGERPRINT}}" >> ~/.oci/config | |
echo "region=${{secrets.OCI_REGION}}" >> ~/.oci/config | |
echo "tenancy=${{secrets.OCI_TENANCY_OCID}}" >> ~/.oci/config | |
echo "key_file=~/.oci/key.pem" >> ~/.oci/config | |
echo "${{secrets.OCI_KEY_FILE}}" >> ~/.oci/key.pem |
This file contains 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: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: nginx | |
template: |
This file contains 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
ShipaPool: oke | |
Resources: | |
General: | |
Setup: | |
Default: false | |
Public: false | |
Provisioner: kubernetes | |
Force: false | |
KubeNamespace: "" | |
Plan: |
This file contains 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
{ | |
"display-name": "ListInstanceDeployment", | |
"gateway-id": "ocid1.apigateway.oc1.iad.amaaaaaa.....", | |
"path-prefix": "/v1", | |
"specification": { | |
"logging-policies": { | |
"access-log": { | |
"is-enabled": true | |
}, |
This file contains 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: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: kubernetes-dashboard | |
labels: | |
k8s-app: kubernetes-dashboard | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole |
NewerOlder