Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vela deployment to the repo #83

Draft
wants to merge 45 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
e9f13ff
Add vela deployment to the repo
shlevy Aug 2, 2023
ff24bd7
Debug testing
shlevy Aug 2, 2023
e19a2f0
Fingers crossed this tag works with new cardano-node
shlevy Aug 2, 2023
f1c1a40
enable login
bogdan-manole Aug 4, 2023
0c2fa3c
add web deployment
bogdan-manole Aug 7, 2023
ecd0f36
switch to autogenerated jwt secret
bogdan-manole Aug 8, 2023
fa24d9f
chore: change FE deployment docker image tag to 4
bogdan-manole Aug 11, 2023
77a3b64
chore: increase FE docker image tag to 5
bogdan-manole Aug 11, 2023
4bc1a46
chore: change deployment to plutus-certification:10
bogdan-manole Aug 16, 2023
07e3c3d
deployment to the next version of container(12)
bogdan-manole Aug 21, 2023
00ad5bc
deploy: Recreate stateful container on new deploy
shlevy Aug 22, 2023
aab4e7b
build: deployment for BE@v13 and FE@v7
bogdan-manole Aug 31, 2023
ef3853d
deploy: Add persistent storage to the wallet
shlevy Sep 7, 2023
c5ba1e0
deploy: Bump CPU
shlevy Sep 7, 2023
7507a78
deploy: change deployment to plutus-certification:14
bogdan-manole Sep 7, 2023
5dccf27
Deploy: Fix CPU specification
shlevy Sep 7, 2023
2c2cbe2
Reduce CPU count to avoid recreating state
shlevy Sep 7, 2023
a72b41a
deploy(plutus-certification-web): increase docker version to 8
bogdan-manole Sep 7, 2023
176eaf0
deploy(be&fe): increase docker image versions
bogdan-manole Sep 25, 2023
51fd680
deploy(be): increase docker image to 9.1
bogdan-manole Sep 26, 2023
d164b6c
deploy(be): increase tag to 16
bogdan-manole Sep 26, 2023
7aea384
deploy(be): increase tag to 17
bogdan-manole Sep 28, 2023
e2b95f6
deploy(be&fe): add private repo support
bogdan-manole Sep 29, 2023
6ef28df
deploy(fe): version 11
bogdan-manole Oct 3, 2023
a3c014d
deploy: be@19 & fe@12
bogdan-manole Oct 30, 2023
366806a
deploy: be@20
bogdan-manole Nov 7, 2023
10fe0bd
deploy(be): change numeric argument to string
bogdan-manole Nov 8, 2023
aaffad6
deploy: be@21
bogdan-manole Nov 8, 2023
a2bdef9
deploy: be@22
bogdan-manole Nov 8, 2023
034572f
deploy: be@24
bogdan-manole Nov 20, 2023
72730b1
deploy: be@26
bogdan-manole Dec 6, 2023
097f7d8
deploy: be@27
bogdan-manole Dec 8, 2023
567a11d
deploy: be@28
bogdan-manole Dec 12, 2023
eab8b38
deploy: Use nixbuild.net for builds
shlevy Dec 29, 2023
5d1c4b9
deploy: Run with a service account that can schedule jobs
shlevy Dec 29, 2023
9f6e11d
deploy: Enable k8s scheduler
shlevy Jan 1, 2024
77412e5
deploy: Update permissions for new pod-oriented workflow
shlevy Jan 6, 2024
6ce84b6
deploy: be@29
bogdan-manole Feb 8, 2024
b8678aa
deploy: fe@13
bogdan-manole Feb 8, 2024
045935e
deployt: be@30
bogdan-manole Feb 12, 2024
d843381
deploy: fe@14
bogdan-manole Feb 13, 2024
3a81b4c
deploy: revert to fe@13
bogdan-manole Feb 13, 2024
0a0d897
deploy: fe@v15
bogdan-manole Feb 14, 2024
72ae4a2
fix:deploy fe@15
bogdan-manole Feb 19, 2024
5841fc3
deploy: be@31
bogdan-manole Mar 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions deploy/dapps-certification-web.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: dapps-certification-web
namespace: dapps-certification-staging
spec:
components:
- name: dapps-certification-web
type: webservice
properties:
image: ghcr.io/demoiog/plutus-certification-web:15
imagePullPolicy: IfNotPresent
ports:
- expose: true
port: 3000
protocol: TCP
traits:
- type: scaler
properties:
replicas: 1
- type: https-route
properties:
domains:
- dapps-certification-web.scdev.aws.iohkdev.io
rules:
- port: 3000
serviceName: dapps-certification-web
policies:
- name: local-dapps-certification
properties:
clusters:
- local
namespace: dapps-certification-staging
type: topology
workflow:
steps:
- type: deploy
meta:
alias: Deploy To local-dapps-certification
name: local-dapps-certification
properties:
policies:
- local-dapps-certification
203 changes: 203 additions & 0 deletions deploy/dapps-certification.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: dapps-certification
namespace: dapps-certification-staging
spec:
components:
- name: dapps-certification
properties:
env:
- name: WALLET_ADDRESS
value: addr_test1qphgqts20fhx0yx7ug42xehcnryukchy5k7hpaksgxax2fzt5w2gu33s8wrw3c9tjs97dr5pulsvf39e56v7c9ar39asptcrtp
- name: WALLET_ID
value: 73857344a0cf884fe044abfe85660cc9a81f6366
- name: WALLET_URL
value: http://localhost:8090
- name: WALLET_CERTIFICATION_PRICE
value: "1000000"
- name: MIN_AMOUNT_FOR_ADDRESS_RESERVATION
value: "1000000"
- name: PORT
value: "80"
- name: ADMIN_WALLET
value: stake_test1uq9cn4p6scw5rk4krttkddg0dcrzjnxuh9fkessajmlg9qgle0hjd
- name: FORCE_ADMIN_ALWAYS
value: "1"
- name: WALLET_PASSPHRASE
valueFrom:
secretKeyRef:
key: WALLET_PASSPHRASE
name: the-secrets
- name: GITHUB_CLIENT_ID
valueFrom:
secretKeyRef:
key: GITHUB_CLIENT_ID
name: github-secrets
- name: GITHUB_CLIENT_SECRET
valueFrom:
secretKeyRef:
key: GITHUB_CLIENT_SECRET
name: github-secrets
- name: DB_PATH
value: "/db/certification.sqlite"
- name: token
valueFrom:
secretKeyRef:
key: token
name: nbn
- name: RUN_CERTIFY_IMAGE
value: ghcr.io/input-output-hk/plutus-certification:31
image: ghcr.io/input-output-hk/plutus-certification:31
imagePullPolicy: Always
imagePullSecrets:
- iohk-ghcr-creds
memory: 8Gi
cpu: "3"
ports:
- expose: true
port: 80
protocol: TCP
volumeMounts:
emptyDir:
- name: ipc
mountPath: /ipc
traits:
# TODO: Abstract this into a custom trait type, along with the NBN token secret above
- type: storage
properties:
configMap:
- name: ssh
mountPath: /etc/ssh
data:
ssh_config: |
Host eu.nixbuild.net
PreferredAuthentications none
User authtoken
SendEnv token

Host *
AddressFamily any
GlobalKnownHostsFile /etc/ssh/ssh_known_hosts
ssh_known_hosts: |
eu.nixbuild.net ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM
- name: nix
mountPath: /etc/nix
data:
nix.conf: |
store = ssh-ng://eu.nixbuild.net
experimental-features = nix-command flakes
require-sigs = true
substituters = https://cache.nixos.org/ https://cache.iog.io ssh://eu.nixbuild.net
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= nixbuild.net/smart.contracts@iohk.io-1:s2PhQXWwsZo1y5IxFcx2D/i2yfvgtEnRBOZavlA8Bog=
- type: storage
properties:
pvc:
- name: db
mountPath: /db
storageClassName: ebs-sc
resources:
requests:
storage: 10Gi
- type: storage
properties:
pvc:
- name: wallet-db
mountPath: /wallet-db
storageClassName: ebs-sc
resources:
requests:
storage: 10Gi
- type: k8s-update-strategy
properties:
strategy:
type: Recreate
- properties:
replicas: 1
type: scaler
- properties:
domains:
- dapps-certification.scdev.aws.iohkdev.io
rules:
- port: 80
serviceName: dapps-certification
type: https-route
- type: sidecar
properties:
name: cardano-wallet
image: inputoutput/cardano-wallet:dev-master
args:
- serve
- --node-socket
- /ipc/node.socket
- --database
- /wallet-db
- --listen-address
- 0.0.0.0
- --testnet
- /config/preprod/genesis-byron.json
volumes:
- name: ipc
path: /ipc
- name: pvc-wallet-db
path: /wallet-db
- type: sidecar
properties:
name: socat
image: alpine/socat
args:
- UNIX-LISTEN:/ipc/node.socket,fork
- TCP-CONNECT:cardano-node-preprod.vela-system:8090
volumes:
- name: ipc
path: /ipc
- type: service-account
properties:
name: dapps-certification
type: webservice
policies:
- name: local-dapps-certification
properties:
clusters:
- local
namespace: dapps-certification-staging
type: topology
workflow:
steps:
- type: deploy
meta:
alias: Deploy To local-dapps-certification
name: local-dapps-certification
properties:
policies:
- local-dapps-certification
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: dapps-certification
namespace: dapps-certification-staging
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: dapps-certification
namespace: dapps-certification-staging
rules:
- apiGroups: [""]
resources: ["pods", "pods/log"]
verbs: ["get", "list", "create", "watch", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: dapps-certification
namespace: dapps-certification-staging
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: dapps-certification
subjects:
- kind: ServiceAccount
name: dapps-certification
namespace: dapps-certification-staging