Skip to content

Commit

Permalink
feat: sdl v2.1
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian committed Aug 29, 2023
1 parent 95b990a commit 8dad106
Show file tree
Hide file tree
Showing 26 changed files with 2,687 additions and 157 deletions.
90 changes: 90 additions & 0 deletions sdl/_testdata/simple4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
version: '2.0'
services:
wordpress:
image: wordpress
depends_on:
- db
expose:
- port: 80
http_options:
max_body_size: 104857600
# accept:
# - "example.com"
to:
- global: true
env:
- WORDPRESS_DB_HOST=db
- WORDPRESS_DB_USER=wordpress
- WORDPRESS_DB_PASSWORD=testpass4you
- WORDPRESS_DB_NAME=wordpress
params:
storage:
wordpress-data:
mount: /var/www/html
readOnly: false
db:
# We use a mariadb image which supports both amd64 & arm64 architecture
image: mariadb:10.6.4
# If you really want to use MySQL, uncomment the following line
#image: mysql:8.0.27
expose:
- port: 3306
to:
- service: wordpress
env:
- MYSQL_RANDOM_ROOT_PASSWORD=1
- MYSQL_DATABASE=wordpress
- MYSQL_USER=wordpress
- MYSQL_PASSWORD=testpass4you
params:
storage:
wordpress-db:
mount: /var/lib/mysql
readOnly: false
profiles:
compute:
wordpress:
resources:
cpu:
units: 1
memory:
size: 1Gi
storage:
- size: 1Gi
- name: wordpress-data
size: 1Gi
attributes:
persistent: true
class: beta3
db:
resources:
cpu:
units: 1
memory:
size: 1Gi
storage:
- size: 1Gi
- name: wordpress-db
size: 1Gi
attributes:
persistent: true
class: beta3
placement:
akash:
pricing:
wordpress:
denom: uakt
amount: 10000
db:
denom: uakt
amount: 10000
deployment:
wordpress:
akash:
profile: wordpress
count: 1
db:
akash:
profile: db
count: 1
45 changes: 45 additions & 0 deletions sdl/_testdata/v2.1-deployment-svc-mismatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
version: "2.1"
services:
web:
image: nginx
expose:
- port: 80
accept:
- ahostname.com
to:
- global: true
- port: 12345
to:
- global: true
proto: udp
profiles:
compute:
web:
resources:
cpu:
units: "100m"
memory:
size: "128Mi"
storage:
size: "1Gi"
placement:
westcoast:
attributes:
region: us-west
signedBy:
anyOf:
- 1
- 2
allOf:
- 3
- 4
pricing:
web:
denom: uakt
amount: 50
deployment:
webapp:
westcoast:
profile: web
count: 2
64 changes: 64 additions & 0 deletions sdl/_testdata/v2.1-private_service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
version: "2.1"
services:
bind:
image: bind9
expose:
- port: 53
proto: udp
to:
- global: true

pg:
image: postgresql
expose:
- port: 5463
to:
- service: bind

profiles:
compute:
bind:
resources:
cpu:
units: "50m"
memory:
size: "64Mi"
storage:
size: "16Mi"
pg:
resources:
cpu:
units: "500m"
memory:
size: "512Mi"
storage:
size: "1000Mi"

placement:
westcoast:
attributes:
region: us-west
signedBy:
anyOf:
- 1
- 2
allOf:
- 3
- 4
pricing:
pg:
denom: uakt
amount: 1000
bind:
denom: uakt
amount: 333
deployment:
pg:
westcoast:
profile: pg
count: 1
bind:
westcoast:
profile: bind
count: 8
38 changes: 38 additions & 0 deletions sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
version: "2.1"

services:
webapp:
image: ghcr.io/akash-network/demo-app
expose:
- port: 80
as: 80
accept:
- thehostname.com
to:
- global: true

profiles:
compute:
web:
resources:
cpu:
units: "100m"
memory:
size: "512Mi"
storage:
size: "512Mi"
placement:
san-jose:
attributes:
region: sjc
pricing:
web:
denom: uakt
amount: 25

deployment:
webapp:
san-jose:
profile: web
count: 1
80 changes: 80 additions & 0 deletions sdl/_testdata/v2.1-service-mix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
version: "2.1"
services:
svca:
image: nginx
expose:
- port: 80
accept:
- ahostname.com
to:
- global: true
- port: 12345
to:
- global: true
proto: udp
svcb:
image: nginx
expose:
- port: 80
accept:
- bhostname.com
to:
- global: true
- port: 12346
to:
- global: true
proto: udp

profiles:
compute:
profilea:
resources:
cpu:
units: "100m"
gpu:
units: "1"
attributes:
vendor:
nvidia:
memory:
size: "128Mi"
storage:
- size: "1Gi"
profileb:
resources:
cpu:
units: "100m"
memory:
size: "128Mi"
storage:
- size: "1Gi"
placement:
westcoast:
attributes:
region: us-west
blalbla: foo
signedBy:
anyOf:
- 1
- 2
allOf:
- 3
- 4
pricing:
profilea:
denom: uakt
amount: 50
profileb:
denom: uakt
amount: 50

deployment:
svca:
westcoast:
profile: profilea
count: 1
svcb:
westcoast:
profile: profileb
count: 1
69 changes: 69 additions & 0 deletions sdl/_testdata/v2.1-service-mix2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
version: "2.1"
services:
svca:
image: nginx
expose:
- port: 80
accept:
- ahostname.com
to:
- global: true
- port: 12345
to:
- global: true
proto: udp
svcb:
image: nginx
expose:
- port: 80
accept:
- bhostname.com
to:
- global: true
- port: 12346
to:
- global: true
proto: udp

profiles:
compute:
profilea:
resources:
cpu:
units: "100m"
gpu:
units: "1"
attributes:
vendor:
nvidia:
memory:
size: "128Mi"
storage:
- size: "1Gi"
placement:
westcoast:
attributes:
region: us-west
blalbla: foo
signedBy:
anyOf:
- 1
- 2
allOf:
- 3
- 4
pricing:
profilea:
denom: uakt
amount: 50

deployment:
svca:
westcoast:
profile: profilea
count: 1
svcb:
westcoast:
profile: profilea
count: 1
Loading

0 comments on commit 8dad106

Please sign in to comment.