Deploying applications using YAML files
To deploy an application from a set of YAML files, click on the button and select “YAML Deploy”. A screen will be shown where you can directly enter the YAML content.
After that, an editor will be shown, where you can write the contents of the YAML files with the entities to be created separated by ---
. Alternatively, you can click on “Load from clipboard” to paste content directly from the system clipboard; “Load from file” to select files from your local drive to upload, or you can just drag-and-drop the files in the text editor.
As an example, copy the following basic application and paste the contents on the editor.
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: my-first-app
spec:
components:
- name: express-server-webservice
type: webservice
properties:
image: crccheck/hello-world
cpu: "50m"
memory: "100M"
ports:
- port: 8000
expose: true
If you want to expose the endpoint to the outside, use the ingress trait.
Deploy local files with the CLI
Alternatively, to deploy an application from a local file or directory with the CLI use:
playground apps deploy <path_to_drawio_files>
Target environment: account/environment
STATUS INFO
SUCCESS application drawio deployed successfully
The application will be deployed in the active account/environment
. The active environment is the one in which we logged in or the selected one after logged in. To deploy an application to a different environment than the active one, include the --env
option in the command
playground apps deploy <path_to_drawio_files> --env <account/env>
Target environment: account/env
STATUS INFO
SUCCESS application <app_name> deployed successfully
Just like from local files, we can deploy an application that is published in a URL. To do this, you will need to use the following command:
playground apps deploy <applicationURL>
Target environment: account/environment
STATUS INFO
SUCCESS application <app_name> deployed successfully