creative-commoners / create-ss-demo Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
If you run instantiate
with a docker image that doesn't exist, you'll end up getting a build error from SSP. We could save time and resources here by checking from the command and exiting early.
Example error:
Warning Failed 13m (x4 over 14m) kubelet, ip-xx-xx-x-xxx.us-west-2.xyz.xyz Failed to pull image "robbieaverill/mfademo:0.1": rpc error: code = Unknown desc = Error response from daemon: pull access denied for robbieaverill/mfademo, repository does not exist or may require 'docker login'
In this case the image name was mfa-demo
with a dash in it.
The SSP API returns an error response if you use anything other than [a-zA-Z0-9]
in the site name. We can validate this pattern early in the instantiate
command to prevent API errors coming back.
https://platform.playpen.pl/static/internal.html#demos-demos-collection-post - see "project_id" param. The input requirements are not documented at this stage.
To create a demo site now you run build
then instantiate
and copy the results from the former into the latter.
We could add a create
command which runs both in one step.
If you don't define SS_AUTH_USER (etc) in environment variables then the commands will fail.
We could ask interactively to enter them instead.
Creating a demo site via the SSP API will not automatically destroy it. You must do this manually. The CWP demo site does this with a queued job scheduled to clean up later on, but if you're doing this via CLI it will need something else in place.
Note: This would probably involve some infrastructure changes somewhere, rather than be bundled directly into this application.
I'm thinking of something like:
Perhaps SQS -> DynamoDB -> Lambda or something similar.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.