GithubHelp home page GithubHelp logo

lib-app's Introduction

UI Editor APIs

Fuse chart from sample dir

./generate.sh

Demo UI Editors

  • GET "/bundleview"

  • POST "/bundleview/orders", v1alpha1.BundleView{}

    • API PATH CHANGED from /deploy/orders -> /bundleview/orders
  • GET "/packageview"

http://localhost:4000/packageview?url=https://raw.githubusercontent.com/bytebuilders/ui-wizards/master/stable/&name=kubedbcom-mongodb-editor-options&version=v0.1.0

  • POST "/packageview/orders"

curl -X POST -H "Content-Type: application/json" -d @./artifacts/mongodb-editor/packageview_chart_order.json http://localhost:4000/packageview/orders?url=https://raw.githubusercontent.com/bytebuilders/ui-wizards/master/stable/&name=kubedbcom-mongodb-editor-options&version=v0.1.0

$ {"kind":"Order","apiVersion":"kubepack.com/v1alpha1","metadata":{"name":"mymongo","namespace":"demo","uid":"d96b7440-2fdb-4fab-89b0-81d2b72631f2","creationTimestamp":"2021-01-13T05:36:37Z"},"spec":{"items":[{"chart":{"url":"https://raw.githubusercontent.com/bytebuilders/ui-wizards/master/stable/","name":"kubedbcom-mongodb-editor-options","version":"v0.1.0","releaseName":"mymongo","namespace":"demo","valuesFile":"values.yaml","valuesPatch":[{"op":"add","path":"/metadata/release/name","value":"mymongo"},{"op":"add","path":"/metadata/release/namespace","value":"demo"},{"op":"replace","path":"/spec/version","value":"4.3.2"}]}}]},"status":{}}

  • GET "/packageview/files"

http://localhost:4000/packageview/files?url=https://raw.githubusercontent.com/bytebuilders/ui-wizards/master/stable/&name=kubedbcom-mongodb-editor-options&version=v0.1.0

  • GET "/packageview/files/*"

http://localhost:4000/packageview/files/templates/app.yaml?url=https://raw.githubusercontent.com/bytebuilders/ui-wizards/master/stable/&name=kubedbcom-mongodb-editor-options&version=v0.1.0

http://localhost:4000/packageview/files/values.yaml?url=https://raw.githubusercontent.com/bytebuilders/ui-wizards/master/stable/&name=kubedbcom-mongodb-editor-options&version=v0.1.0&format=json

  • PUT "/editor/model" (Initial Model)

curl -X PUT -H "Content-Type: application/json" -d @./artifacts/mongodb-editor/mongodb_options_model.json http://localhost:4000/editor/model > ./artifacts/mongodb-editor/mongodb_editor_model.json

  • PUT "/editor/manifest" (Preview API)

curl -X PUT -H "Content-Type: application/json" -d @./artifacts/mongodb-editor/mongodb_editor_model.json http://localhost:4000/editor/manifest > ./artifacts/mongodb-editor/mongodb_editor_manifest.yaml

  • PUT "/editor/resources" (Preview API)

curl -X PUT -H "Content-Type: application/json" -d @./artifacts/mongodb-editor/mongodb_editor_model.json http://localhost:4000/editor/resources?skipCRDs=true | jq '.' > ./artifacts/mongodb-editor/mongodb_editor_resources.json

  • POST "/deploy/orders"

  • GET "/deploy/orders/:id/render/manifest"

http://localhost:4000/deploy/orders/5902b772-319c-40c1-b260-68d81b7864fd/render/manifest

  • GET "/deploy/orders/:id/render/resources"
    • Query parameter: skipCRDs=true

http://localhost:4000/deploy/orders/5902b772-319c-40c1-b260-68d81b7864fd/render/resources?skipCRDs=true

  • PUT "/clusters/:cluster/editor" (apply/install/update app API)

curl -X PUT -H "Content-Type: application/json" -d @./artifacts/mongodb-editor/mongodb_editor_model.json http://localhost:4000/clusters/my_cluster/editor?installCRDs=true

  • DELETE "/clusters/:cluster/editor/namespaces/:namespace/releases/:releaseName" (Delete app api)

curl -X DELETE -H "Content-Type: application/json" http://localhost:4000/clusters/my_cluster/editor/namespaces/demo/releases/mymongo

UI Edit mode

  • PUT "/clusters/my_cluster/editor/model"

curl -X PUT -H "Content-Type: application/json" -d @./artifacts/mongodb-editor/mongodb_editor_model.json http://localhost:4000/clusters/my_cluster/editor/model

  • GET "/clusters/:cluster/editor/manifest"
    • redundant apis
    • can be replaced by getting the model, then using the /editor apis

curl -X PUT -H "Content-Type: application/json" -d @./artifacts/mongodb-editor/mongodb_editor_model.json http://localhost:4000/clusters/my_cluster/editor/manifest

  • GET "/clusters/:cluster/editor/resources"
    • redundant apis
    • can be replaced by getting the model, then using the /editor apis

curl -X PUT -H "Content-Type: application/json" -d @./artifacts/mongodb-editor/mongodb_editor_model.json http://localhost:4000/clusters/my_cluster/editor/resources

Test Delete Editor Resource

curl 'http://localhost:4000/clusters/appscode/editor?installCRDs=true' \
  -X 'PUT' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  --data-raw '{"metadata":{"release":{"name":"sample-std","namespace":"default"},"resource":{"group":"kubedb.com","kind":"MongoDB","name":"mongodbs","scope":"Namespaced","version":"v1alpha2"}},"resources":{"kubedbComMongoDB":{"apiVersion":"kubedb.com/v1alpha2","kind":"MongoDB","metadata":{"labels":{"app.kubernetes.io/instance":"sample-std","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"mongodbs.kubedb.com"},"name":"sample-std","namespace":"default"},"spec":{"clusterAuthMode":"keyFile","podTemplate":{"spec":{"resources":{"limits":{"cpu":".5","memory":"1024Mi"}}}},"replicas":1,"sslMode":"disabled","storage":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"10Gi"}},"storageClassName":"linode-block-storage-retain"},"storageType":"Durable","terminationPolicy":"WipeOut","version":"4.2.3"}}},"spec":{"version":"4.2.3"}}' \
  --compressed \
  --insecure

curl 'http://localhost:4000/clusters/appscode/editor/namespaces/default/releases/sample-std' \
  -X 'DELETE'

Deploy Button APIs

Generate PackageView

Generate BundleView for Chart

Generate order

curl -X POST -H "Content-Type: application/json" -d @artifacts/kubedb-community/bundleview.json http://localhost:4000/bundleview/orders
{"kind":"Order","apiVersion":"kubepack.com/v1alpha1","metadata":{"name":"kubedb-community","uid":"1f1d149b-5226-4659-8feb-165face489b3","creationTimestamp":"2020-02-26T12:00:24Z"},"spec":{"items":[{"chart":{"url":"https://charts.appscode.com/stable/","name":"kubedb","version":"v0.13.0-rc.0","releaseName":"kubedb","namespace":"kube-system","bundle":{"name":"kubedb-community","url":"https://bundles.kubepack.com","version":"v0.13.0-rc.0"}}},{"chart":{"url":"https://charts.appscode.com/stable/","name":"kubedb-catalog","version":"v0.13.0-rc.0","releaseName":"kubedb-catalog","namespace":"kube-system","bundle":{"name":"kubedb-community","url":"https://bundles.kubepack.com","version":"v0.13.0-rc.0"}}}]},"status":{}}

List Helm Hub repositories, Charts and Chart Versions

lib-app's People

Contributors

1gtm avatar arnobkumarsaha avatar masudur-rahman avatar rokibulhasan7 avatar s4k1b avatar tamalsaha avatar tapojit047 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

arnobkumarsaha

lib-app's Issues

Delete app fails with regex error

curl 'http://127.0.0.1:4000/clusters/kubedb-demo-ui.us-central.linode/editor' \
  -X 'PUT' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  --data-raw '{"metadata":{"release":{"name":"demo-mongo","namespace":"default"},"resource":{"group":"kubedb.com","kind":"MongoDB","name":"mongodbs","scope":"Namespaced","version":"v1alpha2"}},"resources":{"appApplication":{"apiVersion":"app.k8s.io/v1beta1","kind":"Application","metadata":{"annotations":{"meta.helm.sh/chart-name":"kubedbcom-mongodb-editor","meta.helm.sh/chart-url":"https://bundles.byte.builders/ui/","meta.helm.sh/chart-version":"v0.1.0"},"labels":{"app.kubernetes.io/instance":"demo-mongo","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"mongodbs.kubedb.com"},"name":"demo-mongo","namespace":"default"},"spec":{"assemblyPhase":"Ready","componentKinds":[{"group":"app.k8s.io","kind":"Application"},{"group":"kubedb.com","kind":"MongoDB"},{"group":"","kind":"Secret"},{"group":"cert-manager.io","kind":"Issuer"},{"group":"monitoring.coreos.com","kind":"ServiceMonitor"},{"group":"stash.appscode.com","kind":"Repository"},{"group":"stash.appscode.com","kind":"BackupConfiguration"},{"group":"stash.appscode.com","kind":"RestoreSession"}],"descriptor":{"description":"MongoDB Editor UI Options","icons":[{"src":"https://cdn.appscode.com/images/products/kubedb/kubedb-community-icon.png","type":"image/png"}],"links":[{"description":"website","url":"https://byte.builders"}],"maintainers":[{"email":"[email protected]","name":"appscode"}],"type":"mongodbs.kubedb.com"},"selector":{"matchLabels":{"app.kubernetes.io/instance":"demo-mongo","app.kubernetes.io/name":"mongodbs.kubedb.com"}}}},"kubedbComMongoDB":{"apiVersion":"kubedb.com/v1alpha2","kind":"MongoDB","metadata":{"labels":{"app.kubernetes.io/instance":"demo-mongo","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"mongodbs.kubedb.com"},"name":"demo-mongo","namespace":"default"},"spec":{"clusterAuthMode":"keyFile","podTemplate":{"spec":{"resources":{"limits":{"cpu":".5","memory":"1024Mi"}}}},"replicas":1,"sslMode":"disabled","storage":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"10Gi"}},"storageClassName":"linode-block-storage-retain"},"storageType":"Durable","terminationPolicy":"WipeOut","version":"4.2.3"}}},"spec":{"version":"4.2.3"}}' \
  --compressed


curl 'http://127.0.0.1:4000/clusters/kubedb-demo-ui.us-central.linode/editor/namespaces/default/releases/demo-mongo' \
  -X 'DELETE' \
  -H 'Accept: application/json, text/plain, */*' \
  --compressed \
  --insecure

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.