Skip to content

Commit

Permalink
feat(apply): adds support for apply command (#30)
Browse files Browse the repository at this point in the history
* initial structure for the params subcommand. boilerplace code copied from ioctl of sootballs.

* fix(network): handles network not found correctly

* feat(apply): adds beta support for apply command

* WIP

* WIP

* added params functions with upload and download plus delete existing

* pulled ankits changes

* WIP

* added explain command

* added explain command and fixed conflicts

* added disk example.  and dependency parser upto apply

* WIP

* local cleanup with some debugging messages

* WIP

* added gracefull handling for mising resources

* fixed regressions. checks for missing resources. resolved resources cache

* updated setup.py

* WIP

* added first draft of riocli apply with package and deployment provisioning

* WIP

* added edge and robot packages. fixes to models.py

* WIP

* WIP

* added wait for disk creation

* initialized delete command

* WIP

* refactor of resolver and applier

* WIP

* apply: adds support for jinja templates

* added support for dryrun

* added pretty logging

* apply: adds support for .j2 files

* added pre-plan page

* pulled devel. fixed deprecated_devel

* fixes

* fixes

* added systemui package as well as deployments

* added fix for key access error

* changes in manifest

* adds robot

* fixes

* adds demo files

* sanitized json schema

* batched together uncommited changes from japan

* adds chart commands

* added listing of helm charts

* documentation for chart commands

* fixed bugs for apply command

* added reasonable package listing based on name then version. Addresses Issue #39

* Added support for bash globbing, secrets , cleaned up explain output, package listing by name

* added support for mermaid.js visualization  with environment flag  MERMAID=true

* fixed restartPolicy, and envArgs default value bug.  Fixed charts apply command. Added secret shading using values in apply command.

* Added support for parallization. added few improvements

* random screen cast from git

* feature(apply): supports enabling of both the runtimes during device creation

* bumped rapyuta-sdk

* incorporated feedback comments.

* added support for both sync and async apply through  --workers flag

* added support for --workers flag to chart command

* updates dependencies

* fixes the worker type

* fixes device deployments with multiple mounts on same exec

Co-authored-by: Shaishav Kumar <[email protected]>
Co-authored-by: Shaishav Kr <[email protected]>
Co-authored-by: Shiv Mohith <[email protected]>
Co-authored-by: Amit  Singh <[email protected]>
  • Loading branch information
5 people authored Sep 30, 2022
1 parent fa250ef commit f6ae40d
Show file tree
Hide file tree
Showing 104 changed files with 10,585 additions and 577 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
# Node artifact files
node_modules/
dist/

jsonschema/json/
# Compiled Java class files
*.class

# Compiled Python bytecode
venv/
build/
*.egg-info/
*.py[cod]

# Log files
Expand Down
25 changes: 16 additions & 9 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,22 @@ furo = "==2021.10.9"

[packages]
riocli = {path = "."}
click-spinner = "==0.1.10"
click-help-colors = "==0.9.1"
click-repl = "==0.2.0"
click-plugins = "==1.1.1"
click = "==8.0.1"
rapyuta-io = "==0.32.0"
pyyaml = "==5.4.1"
click-completion = "==0.5.2"
argparse = "==1.4.0"
pretty-traceback = ">=2022.1018"
argparse = ">=1.4.0"
click = ">=8.0.1"
click-completion = ">=0.5.2"
click-help-colors = ">=0.9.1"
click-plugins = ">=1.1.1"
click-repl = ">=0.2.0"
click-spinner = ">=0.1.10"
dictdiffer = ">=0.9.0"
fastjsonschema = ">=2.16.1"
graphlib-backport = ">=1.0.3"
jinja2 = ">=3.0.1"
munch = ">=2.4.0"
pyyaml = ">=5.4.1"
rapyuta-io = ">=1.5.0"
tabulate = ">=0.8.0"

[requires]
python_version = "3"
955 changes: 480 additions & 475 deletions Pipfile.lock

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions examples/cvat/01-disks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: "apiextensions.rapyuta.io/v1"
kind: "Disk"
metadata:
name: "cvat_minio"
spec:
runtime: cloud
capacity: 256
---
apiVersion: "apiextensions.rapyuta.io/v1"
kind: "Disk"
metadata:
name: "cvat_data_128gb"
spec:
runtime: cloud
capacity: 256
---
apiVersion: "apiextensions.rapyuta.io/v1"
kind: "Disk"
metadata:
name: "cvat_db"
spec:
runtime: cloud
capacity: 32
64 changes: 64 additions & 0 deletions examples/cvat/02-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
apiVersion: apiextensions.rapyuta.io/v1
kind: Deployment
metadata:
name: cvat_db
depends:
kind: package
nameOrGUID: cvat_db_redis
version: "v1.0.2"
labels:
app: cvat
spec:
runtime: cloud
envArgs:
- name: PGDATA
value: "/var/lib/postgresql/data/pgdata"
- name: POSTGRES_DB
value: "cvat"
- name: POSTGRES_USER
value: root
- name: POSTGRES_HOST_AUTH_METHOD
value: "trust"
volumes:
- execName: postgres
mountPath: "/var/lib/postgresql/data"
depends:
kind: disk
nameOrGUID: "cvat_data_128gb"
staticRoutes:
- name: CVAT_UI
depends:
kind: staticroute
nameOrGUID: cvat-prod
---
apiVersion: apiextensions.rapyuta.io/v1
kind: Deployment
metadata:
name: cvat_prod
depends:
kind: package
nameOrGUID: cvat_custom
version: "v1.3.0"
labels:
app: cvat
spec:
depends:
- kind: deployment
nameOrGUID: cvat_db
runtime: cloud
envArgs:
- name: DJANGO_MODWSGI_EXTRA_ARGS
value: " "
- name: ALLOWED_HOSTS
value: "*"
volumes:
- execName: cvat_server
mountPath: "/home/django/user_data"
depends:
kind: disk
nameOrGUID: "cvat_data_128gb"
staticRoutes:
- name: CVAT_UI
depends:
kind: staticroute
nameOrGUID: cvat-prod
31 changes: 31 additions & 0 deletions examples/cvat/03-extra-tools.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: apiextensions.rapyuta.io/v1
kind: Deployment
metadata:
name: pgAdmin
depends:
kind: package
nameOrGUID: pgAdmin
version: "v1.0.1"
labels:
app: cvat
spec:
depends:
- kind: deployment
nameOrGUID: cvat_db
runtime: cloud
envArgs:
- name: PGADMIN_DEFAULT_PASSWORD
value: "pgadmin"
- name: PGADMIN_DEFAULT_EMAIL
value: "[email protected]"
volumes:
- execName: cvat_server
mountPath: "/home/django/user_data"
depends:
kind: disk
nameOrGUID: "cvat_data_128gb"
staticRoutes:
- name: endpoint
depends:
kind: staticroute
nameOrGUID: cvat-prod
292 changes: 292 additions & 0 deletions examples/demo/all-in-one.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions examples/demo/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
routePrefix: "rrkibdem"
7 changes: 7 additions & 0 deletions examples/kiba-robots/00_disk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: "apiextensions.rapyuta.io/v1"
kind: "Disk"
metadata:
name: "small-pvc-4"
spec:
runtime: cloud
capacity: 4
12 changes: 12 additions & 0 deletions examples/kiba-robots/01_secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: "apiextensions.rapyuta.io/v1"
kind: "Secret"
metadata:
name: "sootballs"
guid: secret-vebkjobybhhwmyiwkwvndagu
spec:
type: Docker
docker:
username: shaishavrapyuta
password: asdfg123$
email: shaishavrapyuta
# registry: https://index.docker.io/v1/
9 changes: 9 additions & 0 deletions examples/kiba-robots/02_routednetwork.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: "apiextensions.rapyuta.io/v1"
kind: "Network"
metadata:
name: "sootballs"
spec:
runtime: "cloud"
type: "routed"
rosDistro: "melodic"
resourceLimits: "small"
Loading

0 comments on commit f6ae40d

Please sign in to comment.