diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..df3bdfe --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,47 @@ +name: Test + +on: + push: + branches: + - main + - master + pull_request: + branches: + - main + - master + schedule: + - cron: '0 0 * * *' + +jobs: + test: + name: Tests if the code builds successfully + runs-on: ubuntu-latest + if: github.event_name != 'schedule' + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: yarn + + - name: Install Dependencies + run: yarn install + + - name: Test Build + run: yarn build + + - name: Test Serve + run: yarn serve & sleep 10 + + - name: Test curl + run: | + RESPONSE=$(curl -s -X GET http://localhost:3000) + if echo "$RESPONSE" | grep -q "Skills Network Labs Knowledgebase"; then + echo "Response contains expected text." + else + echo "Response does not contain expected text." + exit 1 + fi diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..e29279c --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +yarn 1.22.22 diff --git a/docs/Lab Tools/cloud-ide.md b/docs/Lab Tools/Cloud IDE/_CloudIDECommon.mdx similarity index 59% rename from docs/Lab Tools/cloud-ide.md rename to docs/Lab Tools/Cloud IDE/_CloudIDECommon.mdx index 6c8c03c..ae9ad87 100644 --- a/docs/Lab Tools/cloud-ide.md +++ b/docs/Lab Tools/Cloud IDE/_CloudIDECommon.mdx @@ -1,10 +1,8 @@ ---- -sidebar_position: 4 ---- +Cloud IDE is an online integrated development environment that closely mimics Visual Studio Code (VS Code). It offers users a familiar interface and functionality, making it accessible to those already comfortable with VS Code. This cloud-based platform supports VS Code plugins and provides a comprehensive set of development tools. Users can access their development environment from any location, eliminating the need for local installation. Cloud IDE is designed as a learning environment, but the skills and familiarity gained here are directly transferable to Visual Studio Code. This design ensures that learners can easily transition from educational projects to professional development work, bridging the gap between learning and real-world application in the software development industry. -# Cloud IDE +## Working Directory -Cloud IDE is an online integrated development environment that closely mimics Visual Studio Code (VS Code). It offers users a familiar interface and functionality, making it accessible to those already comfortable with VS Code. This cloud-based platform supports VS Code plugins and provides a comprehensive set of development tools. Users can access their development environment from any location, eliminating the need for local installation. Cloud IDE is designed as a learning environment, but the skills and familiarity gained here are directly transferable to Visual Studio Code. This design ensures that learners can easily transition from educational projects to professional development work, bridging the gap between learning and real-world application in the software development industry. +The base directory for all learner projects is ```/home/project```. All files and folders created during lab exercises will be stored in this directory by default. ### Layout @@ -16,13 +14,13 @@ This area is divided into two sections: - Tai's Chat Interface: This interface facilitates communication between the learner and Tai, featuring chat history, and learners' message input field. - Lab instructions: These instructions guide learners through the learning activities and exercises. -### Cloud IDE Features +## Cloud IDE Features Cloud IDE empowers learners with a comprehensive IDE experience, including: - File/folder management: Organize and manage files and folders efficiently. - Terminal: Execute commands and interact with the underlying operating system. -#### Skills Network Toolbox: +## Skills Network Toolbox: Within Cloud IDE, learners can access the Skills Network Toolbox by clicking the Skills Network Toolbox Icon button located on the left-hand side of the Cloud IDE menu bar. This toolbox offers a variety of tools to enhance the learning experience and facilitate completion of labs: @@ -50,4 +48,37 @@ Within Cloud IDE, learners can access the Skills Network Toolbox by clicking the - Noun-phrases - Relations (Transformer) - Syntax -- Launch Application - This is how you view the application you run within Cloud IDE. This will open a tab either within Cloud IDE or your browser +- Launch Application - This is how you view the application you run within Cloud IDE. + +#### Viewing your running Applications + +As part of your lab, you may start a web server that accepts traffic to: + +- **Preview static sites or front-end projects:** + Viewing your HTML/CSS/JS projects with live-server. + +- **Integration testing:** + Test APIs or webhooks from apps running inside the IDE. For example, if your backend server runs in the IDE, you can point Postman or a front-end app to the proxied URL. + +- **Cross-browser testing:** + Access the proxied app from different browsers on the same machine or on a device that can reach the proxy URL, to test responsiveness and behavior. + +After you've done this, you can use the launch application button to view your application. + +#### How to use: + +1. **Start your server** + - If you use the built-in live server, a notification will display the port that was opened. + +2. Go to **Skills Network Toolbox**, access **"Launch Application"** tool and input the port. + +3. **Access your application:** + - Click the **"Your Application"** button to open the server inside the Cloud IDE, or + - Open it in a new browser tab. + +--- + +## DISCLAIMER + + - If the user is inactive for an hour, the session will be deleted + - After 12 hours the session will be deleted, even if the user is active \ No newline at end of file diff --git a/docs/Lab Tools/Cloud IDE/_CodeEngine.mdx b/docs/Lab Tools/Cloud IDE/_CodeEngine.mdx new file mode 100644 index 0000000..b58e66a --- /dev/null +++ b/docs/Lab Tools/Cloud IDE/_CodeEngine.mdx @@ -0,0 +1,869 @@ +# Code Engine Reference + +**Code Engine** is a fully-managed, serverless platform for running containers on IBM Cloud. The IBM Cloud CLI has a code engine plugin that lets you manage **projects**, **applications**, **jobs**, and **functions** in IBM Cloud Code Engine directly from the terminal. + +You will already be logged in to the IBM Cloud CLI when you start your lab. Skills Network Labs provides an account for you to use, and you will never need to log in to IBM Cloud yourself. + +## Basic Concepts: + +- **Project** – a workspace that groups your apps, jobs, and functions. A single project is provided for your use. You cannot create a new project or modify the project that we provide. +- **Application (App)** – a containerized service that scales automatically based on requests. +- **Job** – a one-off or recurring workload that runs to completion. +- **Function** – lightweight serverless functions. + +## General CLI Structure + +All Code Engine commands use: + +```bash +ibmcloud ce [flags] +``` + +Examples: + +```bash +#Current Project Info +ibmcloud ce project current + +#Create Sample Hello World Application +ibmcloud ce application create --name myapp --image icr.io/codeengine/hello + +#Create Sample Hello World Application from Source +ibmcloud ce application create --name myapp --build-source https://github.com/IBM/CodeEngine --build-context-dir helloworld --image us.icr.io/${SN_ICR_NAMESPACE}/helloworld --registry-secret icr-secret + +#Create Application from Your Image +ibmcloud ce application create --name myapp --image us.icr.io/${SN_ICR_NAMESPACE}/yourimage:tag --registry-secret icr-secret +``` + +--- + + +### `ibmcloud ce application create` + + Create an application. + + **Syntax** + +```bash + ibmcloud ce application create --name APP_NAME ((--image IMAGE_REF | (--build-source SOURCE + [--image IMAGE_REF])) [--argument ARGUMENT] [--build-commit BUILD_COMMIT] + [--build-context-dir BUILD_CONTEXT_DIR] [--build-dockerfile BUILD_DOCKERFILE] + [--build-git-repo-secret BUILD_GIT_REPO_SECRET] [--build-size BUILD_SIZE] [--build-strategy + BUILD_STRATEGY] [--build-timeout BUILD_TIMEOUT] [--cluster-local] [--command COMMAND] + [--concurrency CONCURRENCY] [--concurrency-target CONCURRENCY_TARGET] [--cpu CPU] [--env + ENV] [--env-from-configmap ENV_FROM_CONFIGMAP] [--env-from-secret ENV_FROM_SECRET] + [--ephemeral-storage EPHEMERAL_STORAGE] [--force] [--max-scale MAX_SCALE] [--memory MEMORY] + [--min-scale MIN_SCALE] [--mount-configmap MOUNT_CONFIGMAP] [--mount-data-store + MOUNT_DATA_STORE] [--mount-secret MOUNT_SECRET] [--no-cluster-local] [--no-wait] [--output + OUTPUT] [--port PORT] [--probe-live PROBE_LIVE] [--probe-ready PROBE_READY] [--quiet] + [--registry-secret REGISTRY_SECRET] [--request-timeout REQUEST_TIMEOUT] [--revision-name + REVISION_NAME] [--scale-down-delay SCALE_DOWN_DELAY] [--service-account SERVICE_ACCOUNT] + [--trusted-profiles-enabled] [--user USER] [--visibility VISIBILITY] [--wait] + [--wait-timeout WAIT_TIMEOUT] +``` + + #### Command Options + + **Required Options** + + **`-n, --name`** + The name of the application. Use a name that is unique within the project. + - The name must begin with a lowercase letter. + - The name must end with a lowercase alphanumeric character. + - The name must be 63 characters or fewer and can contain lowercase letters, numbers, and + hyphens (`-`). + + This value is required. + + **Image and Build Options** + + **`--image, -i`** + The name of the image that is used for this application. The format is + `REGISTRY/NAMESPACE/REPOSITORY:TAG` where `REGISTRY` and `TAG` are optional. If `REGISTRY` + is not specified, the default is `docker.io`. If `TAG` is not specified, the default is + `latest`. The image option is required if the `--build-source` option is not specified. This + value is optional. + + **`--build-source, --source, --bsrc, --src`** + The URL of the Git repository or the path to local source that contains your source code; + for example `https://github.com/IBM/CodeEngine` or `.`. This value is optional. + + **`--build-commit, --commit, --bcm, --cm, --revision`** + The commit, tag, or branch in the source repository to pull. The build commit option is + allowed only if the `--build-source` option is set. This value is optional. + + **`--build-context-dir, --context-dir, --bcdr, --cdr`** + The directory in the repository that contains the buildpacks file or the Dockerfile. The + build context directory option is allowed only if the `--build-source` option is set. This + value is optional. + + **`--build-dockerfile, --dockerfile, --bdf, --df`** + The path to the Dockerfile. Specify this option only if the name is other than `Dockerfile`. + The build dockerfile option is allowed only if the `--build-source` option is set. This + value is optional. The default value is `Dockerfile`. + + **`--build-git-repo-secret, --git-repo-secret, --bgrs, --grs, --repo`** + The name of the SSH secret, which contains the credentials to access the private repository + that contains the source code to build your container image. To create this SSH secret, use + the `secret create --format SSH` command. An SSH secret is also used as a Git repository + access secret. This option is allowed only if the `--build-source` option is set to the URL + of a Git repository. This value is optional. + + **`--build-size, --size, --bsz, --sz`** + The size for the build, which determines the amount of resources used. Valid values are + `small`, `medium`, `large`, `xlarge`, and `xxlarge`. For details, see Determining the size + of the build. The build size option is allowed only if the `--build-source` option is set. + This value is optional. The default value is `medium`. + + **`--build-strategy, --strategy, --bstr, --str`** + The strategy to use for building the image. Valid values are `dockerfile` and `buildpacks`. + The build strategy option is allowed only if the `--build-source` option is set. If not + specified, the build strategy is determined by Code Engine if `--build-source` is specified + and the source is on your local machine. This value is optional. The default value is + `dockerfile`. + + **`--build-timeout, --bto`** + The amount of time, in seconds, that can pass before the build must succeed or fail. The + build timeout option is allowed only if the `--build-source` option is set. This value is + optional. The default value is `600`. + + **Application Configuration Options** + + **`--argument, --arg, -a`** + Set arguments for the application. Specify one argument per `--argument` option; for + example, `-a argA -a argB`. This value overrides the default values that are specified + within the container image. This value is optional. + + **`--command, --cmd, -c`** + Set commands for the application. Specify one command per `--command` option; for example, + `--cmd cmdA --cmd cmdB`. This value overrides the default command that is specified within + the container image. This value is optional. + + **`--port, -p`** + The port where the application listens. The format is `[NAME:]PORT`, where `[NAME:]` is + optional. If `[NAME:]` is specified, valid values are `h2c`, or `http1`. When `[NAME:]` is + not specified or is `http1`, the port uses HTTP/1.1. When `[NAME:]` is `h2c`, the port uses + unencrypted HTTP/2. By default, Code Engine assumes apps listen for incoming connections on + port 8080. If your application needs to listen on a port other than port 8080, use `--port` + to specify the port. This value is optional. + + **`--user, -u`** + The user ID (UID) that is used to run the application. This value overrides any user ID that + is set in the application Dockerfile. The ID must conform to the operating system + requirements of the container. This value is optional. The default value is `0`. + + **Resource Options** + + **`--cpu`** + The amount of CPU set for the instance of the application. For valid values, see Supported + memory and CPU combinations. This value is optional. The default value is `1`. + + **`--memory, -m`** + The amount of memory set for the instance of the application. Use `M` for megabytes or `G` + for gigabytes. For valid values, see Supported memory and CPU combinations. This value is + optional. The default value is `4G`. + + **`--ephemeral-storage, --es`** + The amount of ephemeral storage to set for the instance of the application. Use `M` for + megabytes or `G` for gigabytes. This value is optional. The default value is `400M`. + + **Scaling Options** + + **`--concurrency, --cn`** + The maximum number of requests that can be processed concurrently per instance. This value + is optional. The default value is `100`. + + **`--concurrency-target, --ct`** + The threshold of concurrent requests per instance at which one or more additional instances + are created. Use this value to scale up instances based on concurrent number of requests. If + `--concurrency-target` is not specified, this option defaults to the value of the + `--concurrency` option. This value is optional. The default value is `0`. + + **`--max-scale, --max, --maxscale`** + The maximum number of instances that can be used for this application. If you set this value + to `0`, the application scales as needed. The application scaling is limited only by the + instances per the resource quota for the project of your application. See Limits and quotas + for Code Engine. This value is optional. The default value is `10`. + + **`--min-scale, --min, --minscale`** + The minimum number of instances that can be used for this application. This option is useful + to ensure that no instances are running when not needed. This value is optional. The + default value is `0`. + + **`--scale-down-delay, --sdd`** + The amount of time in seconds that must pass at reduced concurrency before the application + is scaled down. An increase of the number of concurrent requests causes an application to + scale up. If the number of requests drops (reduced concurrency), the specified amount of + time for this option determines how long the reduced concurrency needs to persist, before + the application is scaled down. By default, the application will be scaled down immediately, + if reduced concurrency is detected. This value is optional. The default value is `0`. + + **Environment and Configuration Options** + + **`--env, -e`** + Set environment variables in the application. Must be in `NAME=VALUE` format. This action + adds a new environment variable or overrides an existing environment variable. Specify one + environment variable per `--env` option; for example, `--env envA=A --env envB=B`. This + value is optional. + + **`--env-cm, --env-from-configmap`** + Set environment variables from the key-value pairs that are stored in this configmap by + using one of the following ways: + - To add environment variables for all keys in a configmap that is named `configmapName`, + use the value `configmapName`. You can modify the environment variable names by specifying a + prefix when referencing the configmap. To specify a prefix, use the value + `PREFIX=CONFIGMAP_NAME`. Each resulting environment variable has the format + ``. For example, to set the prefix for all variable names + of keys in configmap `configmapName` to `CUSTOM_`, use the value `CUSTOM_=configmapName`. If + the configmap `configmapName` contains `KEY_A`, the environment variable name is + `CUSTOM_KEY_A`. + - To add environment variables for individual keys, use the format `NAME:KEY_A,KEY_B`. For + example, to add an environment variable for a single key `key1` in a configmap that is named + `configmapName`, use the value `configmapName:key1`. To assign a different name to a + referenced key, use the format `NAME:NEW_NAME=KEY_A`. For example, to add an environment + variable named `myKey` for a single key `key1` in a configmap that is named `configmapName`, + use the value `configmapName:myKey=key1`. + + This value is optional. + + **`--env-sec, --env-from-secret`** + Set environment variables from the key-value pairs that are stored in a secret by using one + of the following ways: + - To add environment variables for all keys in a secret that is named `secretName`, use the + value `secretName`. You can modify the environment variable names by specifying a prefix + when referencing the secret. To specify a prefix, use the value `PREFIX=SECRET_NAME`. Each + resulting environment variable has the format ``. For + example, to set the prefix for all variable names of keys in secret `secretName` to + `CUSTOM_`, use the value `CUSTOM_=secretName`. If the secret `secretName` contains `KEY_A`, + the environment variable name is `CUSTOM_KEY_A`. + - To add environment variables for individual keys, use the format `NAME:KEY_A,KEY_B`. For + example, to add an environment variable for a single key `key1` in a secret that is named + `secretName`, use the value `secretName:key1`. To assign a different name to a referenced + key, use the format `NAME:NEW_NAME=KEY_A`. For example, to add an environment variable named + `myKey` for a single key `key1` in a secret that is named `secretName`, use the value + `secretName:myKey=key1`. + + This value is optional. + + **Mount Options** + + **`--mount-configmap, --mount-cm`** + Add the contents of a configmap to the file system of your application container by + providing a mount directory and the name of a configmap, with the format + `MOUNT_DIRECTORY=CONFIGMAP_NAME`. Each mounted configmap must use a unique mount directory. + For each key-value pair in the configmap, a file is added to the specified mount directory + where the filename is the key and the contents of the file is the value of the key-value + pair. Specify one mount configuration per `--mount-configmap` option; for example, + `--mount-configmap /etc/config-a=config-a --mount-configmap /etc/config-b=config-b`. This + value is optional. + + **`--mount-data-store, --mount-ds`** + Mount a persistent data store. The format is `MOUNT_DIRECTORY=STORAGE_NAME[:SUBPATH]`. The + `SUBPATH` is optional. This option can be specified multiple times. This value is optional. + + **`--mount-secret, --mount-sec`** + Add the contents of a secret to the file system of your application container by providing a + mount directory and the name of a secret, with the format `MOUNT_DIRECTORY=SECRET_NAME`. + Each mounted secret must use a unique mount directory. For each key-value pair in the + secret, a file is added to the specified mount directory where the filename is the key and + the contents of the file is the value of the key-value pair. Specify one mount configuration + per `--mount-secret` option; for example, `--mount-secret /etc/secret-a=secret--a + --mount-secret /etc/secret-b=secret-b`. This value is optional. + + **Network and Visibility Options** + + **`--cluster-local, --cl`** + Deploy the application with a project-only endpoint. Setting a project-only endpoint means + that your app is not accessible from the public internet and network access is only possible + from other Code Engine components that are running in the same project. This value is + optional. The default value is `false`. + + **`--no-cluster-local, --ncl`** + Deploy the application with a public endpoint. The application deploys such that it can + receive requests from the public internet or from components within the Code Engine project. + This value is optional. The default value is `true`. + + **`--visibility, -v`** + The visibility for the application. Valid values are `public`, `private`, and `project`. + Setting a visibility of `public` means that your app can receive requests from the public + internet or from components within the Code Engine project. Setting a visibility of + `private` means that your app is not accessible from the public internet and network access + is only possible from other IBM Cloud using Virtual Private Endpoints (VPE) or Code Engine + components that are running in the same project. Visibility can only be `private` if the + project supports application private visibility. Setting a visibility of `project` means + that your app is not accessible from the public internet and network access is only possible + from other Code Engine components that are running in the same project. This value is + optional. + + **Health Check Options** + + **`--probe-live, --pl`** + Configure the liveness probe for this application in `NAME=VALUE` format. Valid options for + `NAME` are: `type`, `port`, `path`, `interval`, `initial-delay`, `timeout`, + `failure-threshold`. This option can be specified multiple times. The `type` property is + required and valid values are `tcp` and `http`. For example, `--probe-live type=tcp + --probe-live port=8080`. For more information about working with probes, see Configuring + probes for your app. This value is optional. + + **`--probe-ready, --pr`** + Configure the readiness probe for this application in `NAME=VALUE` format. Valid options for + `NAME` are: `type`, `port`, `path`, `interval`, `initial-delay`, `timeout`, + `failure-threshold`. This option can be specified multiple times. The `type` property is + required and valid values are `tcp` and `http`. For example, `--probe-ready type=tcp + --probe-ready port=8080`. For more information about working with probes, see Configuring + probes for your app. This value is optional. + + **Timeout Options** + + **`--request-timeout, --rt, --timeout, -t`** + The amount of time in seconds that can pass before requests made to the application must + succeed or fail. This value is optional. The default value is `300`. + + **Security Options** + + **`--registry-secret, --rs`** + The name of the registry secret. The registry secret is used to authenticate with a private + registry when you download the container image. This value is optional. + + **`--service-account, --sa`** + The name of the service account. A service account provides an identity for processes that + run in an instance. For built-in service accounts, you can use the shortened names + `manager`, `none`, `reader`, and `writer`. You can also use the full names that are prefixed + with the Kubernetes Config Context, which can be determined with the `project current` + command. This value is optional. + + **`--trusted-profiles-enabled, --trusted, --tpe`** + Enable mounting of a compute resource token to the container of this application. This value + is optional. The default value is `false`. + + **Execution Options** + + **`--force, -f`** + Do not verify the existence of specified configmap and secret references. Configmap + references are specified with the `--env-from-configmap` or `--mount-configmap` options. + Secret references are specified with the `--env-from-secret`, `--mount-secret` or + `--registry-secret` options. This value is optional. The default value is `false`. + + **`--no-wait, --nw`** + Create the application and do not wait for the application to be ready. If you specify the + `--no-wait` option, the application create begins and does not wait. Use the `app get` + command to check the application status. This value is optional. The default value is + `false`. + + **`--wait, -w`** + Create the application and wait for the application to be ready. If you specify the `--wait` + option, the application create waits for a maximum time in seconds, as set by the + `--wait-timeout` option, for the application to become ready. If the application is not + ready within the specified `--wait-timeout` period, the application create fails. This value + is optional. The default value is `true`. + + **`--wait-timeout, --wto`** + The length of time in seconds to wait for the application to be ready. This value is + required if the `--wait` option is specified. This value is ignored if the `--no-wait` + option is specified. The default value is `600`. + + **Output Options** + + **`--output, -o`** + Specifies the format of the command output. Valid values are `json`, `yaml`, + `jsonpath=JSONPATH_EXPRESSION`, `jsonpath-as-json=JSONPATH_EXPRESSION`, `url`, and + `project-url`. Use `jsonpath` to specify the path to an element of the JSON output. This + value is optional. + + **`--quiet, -q`** + Specify this option to reduce the output of the command. This value is optional. The default + value is `false`. + + **Revision Options** + + **`--rn, --revision-name`** + The name of the revision. Use a name that is unique within the application. + - The name can contain lowercase letters, numbers, and hyphens (`-`). + - The name must end with a lowercase alphanumeric character. + - The fully qualified revision name must be in the format, `Name_of_application-Name of + revision`. + - The fully qualified revision name must be 63 characters or fewer. + + This value is optional. + +--- + +### `ibmcloud ce application delete` + + Delete an application. + + **Syntax** +```bash + ibmcloud ce application delete --name APPLICATION_NAME [--force] [--ignore-not-found] + [--no-wait] [--quiet] [--wait] [--wait-timeout WAIT_TIMEOUT] +``` + #### Command Options + + **Required Options** + + **`--name, -n`** + The name of the application. This value is required. + + **Execution Options** + + **`--force, -f`** + Force deletion without confirmation. This value is optional. The default value is `false`. + + **`--ignore-not-found, --inf`** + If not found, do not fail. This value is optional. The default value is `false`. + + **Wait Options** + + **`--no-wait, --nw`** + Delete the application and do not wait for the application to be deleted. If you specify the + `--no-wait` option, the application delete begins and does not wait. Use the `app get` + command to check the application status. This value is optional. The default value is + `true`. + + **`--wait, -w`** + Delete the application and wait for the application to be deleted. If you specify the + `--wait` option, the application delete waits for a maximum time in seconds, as set by the + `--wait-timeout` option, for the application to become deleted. If the application is not + deleted within the specified `--wait-timeout` period, the application delete fails. This + value is optional. The default value is `false`. + + **`--wait-timeout, --wto`** + The length of time in seconds to wait for the application to be deleted. This value is + required if the `--wait` option is specified. This value is ignored if the `--no-wait` + option is specified. The default value is `600`. + + **Output Options** + + **`--quiet, -q`** + Specify this option to reduce the output of the command. This value is optional. The default + value is `false`. + +--- + +### `ibmcloud ce application events` + + Display the system events of application instances. System events are retained up to 60 + minutes. + + **Syntax** + +```bash + ibmcloud ce application events (--instance APP_INSTANCE | --application APP_NAME) [--output + OUTPUT] [--quiet] +``` + + #### Command Options + + **Required Options** + + **`--application, --app, -a, --name, -n`** + Display the events of all the instances of the specified application. This value is required + if `--instance` is not specified. + + **`--instance, -i`** + The name of a specific application instance. Use the `app get` command to find the instance + name. This value is required if `--application` is not specified. + + **Output Options** + + **`--output, -o`** + Specifies the format of the command output. Valid values are `json`, `yaml`, + `jsonpath=JSONPATH_EXPRESSION`, and `jsonpath-as-json=JSONPATH_EXPRESSION`. Use `jsonpath` + to specify the path to an element of the JSON output. This value is optional. + + **`--quiet, -q`** + Specify this option to reduce the output of the command. This value is optional. The default + value is `false`. + +--- + +### `ibmcloud ce application get` + + Display the details of an application. + + **Syntax** + + ```bash + ibmcloud ce application get --name APPLICATION_NAME [--output OUTPUT] [--quiet] [--show-all-revisions] + ``` + + #### Command Options + + **Required Options** + + **`--name, -n`** + The name of the application. This value is required. + + **Display Options** + + **`--show-all-revisions, -r`** + Show all revisions for this application. If not specified, only revisions which are configured to receive traffic are shown. This value is optional. The default value is `false`. + + **Output Options** + + **`--output, -o`** + Specifies the format of the command output. Valid values are `json`, `yaml`, `jsonpath=JSONPATH_EXPRESSION`, `jsonpath-as-json=JSONPATH_EXPRESSION`, `url`, and `project-url`. Use `jsonpath` to specify the path to an element of the JSON output. This value is optional. + + **`--quiet, -q`** + Specify this option to reduce the output of the command. This value is optional. The default value is `false`. + +--- + +### `ibmcloud ce application list` + + List all applications in a project. + + **Syntax** + + ```bash + ibmcloud ce application list [--output OUTPUT] [--quiet] [--sort-by SORT_BY] + ``` + + #### Command Options + + **Display Options** + + **`--sort-by, -s`** + Specifies the column by which to sort the list. Valid values are `name` and `age`. This value is optional. The default value is `name`. + + **Output Options** + + **`--output, -o`** + Specifies the format of the command output. Valid values are `json`, `yaml`, `jsonpath=JSONPATH_EXPRESSION`, and `jsonpath-as-json=JSONPATH_EXPRESSION`. Use `jsonpath` to specify the path to an element of the JSON output. This value is optional. + + **`--quiet, -q`** + Specify this option to reduce the output of the command. This value is optional. The default value is `false`. + +--- + +### `ibmcloud ce application logs` + + Display the logs of application instances. + + **Syntax** + + ```bash + ibmcloud ce application logs (--instance APP_INSTANCE | --application APP_NAME) [--all-containers] [--follow] [--output OUTPUT] [--quiet] [--raw] [--tail TAIL] [--timestamps] + ``` + + #### Command Options + + **Required Options** + + **`--application, --app, -a, --name, -n`** + Display the logs of all the instances of the specified application. This value is required if `--instance` is not specified. + + **`--instance, -i`** + The name of a specific application instance. Use the `app get` command to find the instance name. This value is required if `--application` is not specified. + + **Display Options** + + **`--all-containers, --all`** + Display the logs of all containers of the specified application instances. This value is optional. The default value is `false`. + + **`--follow, -f`** + Follow the logs of application instances. Use this option to stream logs of application instances. If you specify the `--follow` option, you must enter Ctrl+C to terminate this log command. This value is optional. The default value is `false`. + + **`--raw, -r`** + Display logs without instance and container labels. This value is optional. The default value is `false`. + + **`--tail, -t`** + Limit the display of logs of containers of the specified application instances to a maximum number of recent lines per container. For example, to display the last 3 lines of the logs of the containers of the specified application instances, specify `--tail 3`. If this option is not specified, all lines of the logs of the containers of the specified application instances are displayed. This value is optional. The default value is `-1`. + + **`--timestamps, --ts`** + Include timestamps on each line in the log output. This value is optional. The default value is `false`. + + **Output Options** + + **`--output, -o`** + Specifies the format of the command output. Valid values are `json`, `yaml`, `jsonpath=JSONPATH_EXPRESSION`, and `jsonpath-as-json=JSONPATH_EXPRESSION`. Use `jsonpath` to specify the path to an element of the JSON output. This value is optional. + + **`--quiet, -q`** + Specify this option to reduce the output of the command. This value is optional. The default value is `false`. + +--- + +### `ibmcloud ce application restart` + + Restart running application instances. + + **Syntax** + + ```bash + ibmcloud ce application restart (--instance APP_INSTANCE | --application APP_NAME) [--quiet] + ``` + + #### Command Options + + **Required Options** + + **`--application, --app, -a, --name, -n`** + Restart all the running instances of the specified application. This value is required if `--instance` is not specified. + + **`--instance, -i`** + The name of a specific application instance. Use the `app get` command to find the instance name. This value is required if `--application` is not specified. + + **Output Options** + + **`--quiet, -q`** + Specify this option to reduce the output of the command. This value is optional. The default value is `false`. + +--- + +### `ibmcloud ce application unbind` + + Unbind IBM Cloud service instances from an application. + + **Syntax** + + ``` + ibmcloud ce application unbind --name APP_NAME (--binding BINDING_NAME | --all) [--quiet] + ``` + + #### Command Options + + **Required Options** + + **`--name, -n`** + The name of the application to unbind. This value is required. + + **`--binding, -b`** + The name of the binding to unbind. Run `ibmcloud ce app get -n APP_NAME` to view binding names. This value is required if `--all` is not specified. + + **`--all, -A`** + Unbinds all service instances for this application. This value is required if `--binding` is not specified. The default value is `false`. + + **Output Options** + + **`--quiet, -q`** + Specify this option to reduce the output of the command. This value is optional. The default value is `false`. + +--- + +### `ibmcloud ce application update` + + Update an application. Updating your application creates a revision. When calls are made to the application, traffic is routed to the revision. + + **Syntax** + + ```bash + ibmcloud ce application update --name APP_NAME [--argument ARGUMENT] [--arguments-clear] [--build-clear] [--build-commit BUILD_COMMIT] [--build-commit-clear] [--build-context-dir BUILD_CONTEXT_DIR] [--build-dockerfile BUILD_DOCKERFILE] [--build-git-repo-secret BUILD_GIT_REPO_SECRET] [--build-git-repo-secret-clear] [--build-size BUILD_SIZE] [--build-source BUILD_SOURCE] [--build-strategy BUILD_STRATEGY] [--build-timeout BUILD_TIMEOUT] [--cluster-local] [--command COMMAND] [--commands-clear] [--concurrency CONCURRENCY] [--concurrency-target CONCURRENCY_TARGET] [--cpu CPU] [--env ENV] [--env-from-configmap ENV_FROM_CONFIGMAP] [--env-from-configmap-rm ENV_FROM_CONFIGMAP_RM] [--env-from-secret ENV_FROM_SECRET] [--env-from-secret-rm ENV_FROM_SECRET_RM] [--env-rm ENV_RM] [--ephemeral-storage EPHEMERAL_STORAGE] [--force] [--image IMAGE] [--max-scale MAX_SCALE] [--memory MEMORY] [--min-scale MIN_SCALE] [--mount-configmap MOUNT_CONFIGMAP] [--mount-data-store MOUNT_DATA_STORE] [--mount-rm MOUNT_RM] [--mount-secret MOUNT_SECRET] [--no-cluster-local] [--no-wait] [--output OUTPUT] [--port PORT] [--probe-live PROBE_LIVE] [--probe-live-clear] [--probe-ready PROBE_READY] [--probe-ready-reset] [--quiet] [--rebuild] [--registry-secret REGISTRY_SECRET] [--registry-secret-clear] [--request-timeout REQUEST_TIMEOUT] [--revision-name REVISION_NAME] [--scale-down-delay SCALE_DOWN_DELAY] [--service-account SERVICE_ACCOUNT] [--service-account-clear] [--trusted-profiles-enabled] [--user USER] [--visibility VISIBILITY] [--wait] [--wait-timeout WAIT_TIMEOUT] + ``` + + #### Command Options + + **Required Options** + + **`--name, -n`** + The name of the application. This value is required. + + **Image and Build Options** + + **`--image, -i`** + The name of the image that is used for this application. The format is `REGISTRY/NAMESPACE/REPOSITORY:TAG` where `REGISTRY` and `TAG` are optional. If `REGISTRY` is not specified, the default is `docker.io`. If `TAG` is not specified, the default is `latest`. This value is optional. + + **`--build-source, --source, --bsrc, --src`** + The URL of the Git repository or the path to local source that contains your source code; for example `https://github.com/IBM/CodeEngine` or `.`. This value is optional. + + **`--build-clear, --bc`** + Remove the association of a build from this application. The build clear option is allowed only if your app currently has an associated build. This value is optional. The default value is `false`. + + **`--build-commit, --commit, --bcm, --cm, --revision`** + The commit, tag, or branch in the source repository to pull. The build commit option is allowed only if the `--build-source` option is set to the URL of a Git repository on this app update command, or your application currently has an associated build from a Git repository source. This value is optional. + + **`--build-commit-clear, --commit-clear, --bcmc, --cmc`** + Clear the commit, tag, or branch in the source repository to pull. The commit clear option is allowed if your application currently has an associated build. This value is optional. The default value is `false`. + + **`--build-context-dir, --context-dir, --bcdr, --cdr`** + The directory in the repository that contains the buildpacks file or the Dockerfile. The build context directory option is allowed if the `--build-source` option is set on this app update command, or your application currently has an associated build. This value is optional. + + **`--build-dockerfile, --dockerfile, --bdf, --df`** + The path to the Dockerfile. Specify this option only if the name is other than `Dockerfile`. The build dockerfile option is allowed only if the `--build-source` option is set on this app update command, or your application currently has an associated build. This value is optional. The default value is `Dockerfile`. + + **`--build-git-repo-secret, --git-repo-secret, --bgrs, --grs, --repo`** + The name of the SSH secret, which contains the credentials to access the private repository that contains the source code to build your container image. To create this SSH secret, use the `secret create --format SSH` command. An SSH secret is also used as a Git repository access secret. This option is allowed only if the `--build-source` option is set to the URL of a Git repository on this application update command, or your application currently has an associated build from a Git repository source. This value is optional. + + **`--build-git-repo-secret-clear, --git-repo-secret-clear, --bgrsc, --grsc`** + Clear the SSH secret. This option is allowed if your application currently has an associated build. This value is optional. The default value is `false`. + + **`--build-size, --size, --bsz, --sz`** + The size for the build, which determines the amount of resources used. Valid values are `small`, `medium`, `large`, `xlarge`, and `xxlarge`. For details, see Determining the size of the build. The build size option is allowed only if the `--build-source` option is set on this app update command, or your application currently has an associated build. This value is optional. The default value is `medium`. + + **`--build-strategy, --strategy, --bstr, --str`** + The strategy to use for building the image. Valid values are `dockerfile` and `buildpacks`. The build strategy option is allowed only if the `--build-source` option is set on this app update command, or your application currently has an associated build. If not specified, the build strategy is determined by Code Engine if `--build-source` is specified and the source is on your local machine. This value is optional. The default value is `dockerfile`. + + **`--build-timeout, --bto`** + The amount of time, in seconds, that can pass before the build must succeed or fail. The build timeout option is allowed only if the `--build-source` option is set on this app update command, or your application currently has an associated build. This value is optional. The default value is `600`. + + **`--rebuild`** + Rebuild image from source. The rebuild option is allowed if your application currently has an associated build. This value is optional. The default value is `false`. + + **Application Configuration Options** + + **`--argument, --arg, -a`** + Set arguments for the application. Specify one argument per `--argument` option; for example, `-a argA -a argB`. This value is optional. + + **`--arguments-clear, --ac`** + Clear application arguments. This value is optional. The default value is `false`. + + **`--command, --cmd, -c`** + Set commands for the application. Specify one command per `--command` option; for example, `--cmd cmdA --cmd cmdB`. This value overrides the default command that is specified within the container image. This value is optional. + + **`--commands-clear, --cc`** + Clear application commands. This value is optional. The default value is `false`. + + **`--port, -p`** + The port where the application listens. The format is `[NAME:]PORT`, where `[NAME:]` is optional. If `[NAME:]` is specified, valid values are `h2c`, or `http1`. When `[NAME:]` is not specified or is `http1`, the port uses HTTP/1.1. When `[NAME:]` is `h2c`, the port uses unencrypted HTTP/2. By default, Code Engine assumes apps listen for incoming connections on port 8080. If your application needs to listen on a port other than port 8080, use `--port` to specify the port. This value is optional. + + **`--user, -u`** + The user ID (UID) that is used to run the application. This value overrides any user ID that is set in the application Dockerfile. The ID must conform to the operating system requirements of the container. This value is optional. The default value is `0`. + + **Resource Options** + + **`--cpu`** + The amount of CPU set for the instance of the application. For valid values, see Supported memory and CPU combinations. This value is optional. The default value is `0`. + + **`--memory, -m`** + The amount of memory set for the instance of the application. Use `M` for megabytes or `G` for gigabytes. For valid values, see Supported memory and CPU combinations. This value is optional. + + **`--ephemeral-storage, --es`** + The amount of ephemeral storage to set for the instance of the application. Use `M` for megabytes or `G` for gigabytes. This value is optional. + + **Scaling Options** + + **`--concurrency, --cn`** + The maximum number of requests that can be processed concurrently per instance. This value is optional. The default value is `0`. + + **`--concurrency-target, --ct`** + The threshold of concurrent requests per instance at which one or more additional instances are created. Use this value to scale up instances based on concurrent number of requests. If `--concurrency-target` is not specified, this option defaults to the value of the `--concurrency` option. This value is optional. The default value is `0`. + + **`--max-scale, --max, --maxscale`** + The maximum number of instances that can be used for this application. If you set this value to `0`, the application scales as needed. The application scaling is limited only by the instances per the resource quota for the project of your application. See Limits and quotas for Code Engine. This value is optional. The default value is `10`. + + **`--min-scale, --min, --minscale`** + The minimum number of instances that can be used for this application. This value is optional. The default value is `0`. + + **`--scale-down-delay, --sdd`** + The amount of time in seconds that must pass at reduced concurrency before the application is scaled down. An increase of the number of concurrent requests causes an application to scale up. If the number of requests drops (reduced concurrency), the specified amount of time for this option determines how long the reduced concurrency needs to persist, before the application is scaled down. By default, the application will be scaled down immediately, if reduced concurrency is detected. This value is optional. The default value is `0`. + + **Environment and Configuration Options** + + **`--env, -e`** + Set environment variables in the application. Must be in `NAME=VALUE` format. This action adds a new environment variable or overrides an existing environment variable. Specify one environment variable per `--env` option; for example, `--env envA=A --env envB=B`. This value is optional. + + **`--env-cm, --env-from-configmap`** + Set environment variables from the key-value pairs that are stored in this configmap by using one of the following ways: + - To add environment variables for all keys in a configmap that is named `configmapName`, use the value `configmapName`. You can modify the environment variable names by specifying a prefix when referencing the configmap. To specify a prefix, use the value `PREFIX=CONFIGMAP_NAME`. Each resulting environment variable has the format ``. For example, to set the prefix for all variable names of keys in configmap `configmapName` to `CUSTOM_`, use the value `CUSTOM_=configmapName`. If the configmap `configmapName` contains `KEY_A`, the environment variable name is `CUSTOM_KEY_A`. + - To add environment variables for individual keys, use the format `NAME:KEY_A,KEY_B`. For example, to add an environment variable for a single key `key1` in a configmap that is named `configmapName`, use the value `configmapName:key1`. To assign a different name to a referenced key, use the format `NAME:NEW_NAME=KEY_A`. For example, to add an environment variable named `myKey` for a single key `key1` in a configmap that is named `configmapName`, use the value `configmapName:myKey=key1`. + + This value is optional. + + **`--env-from-configmap-rm, --env-cm-rm`** + Remove environment variable references to full configmaps by using the configmap name. To remove individual key references to configmaps, use the `--env-rm` option. This option can be specified multiple times. This value is optional. + + **`--env-sec, --env-from-secret`** + Set environment variables from the key-value pairs that are stored in a secret by using one of the following ways: + - To add environment variables for all keys in a secret that is named `secretName`, use the value `secretName`. You can modify the environment variable names by specifying a prefix when referencing the secret. To specify a prefix, use the value `PREFIX=SECRET_NAME`. Each resulting environment variable has the format ``. For example, to set the prefix for all variable names of keys in secret `secretName` to `CUSTOM_`, use the value `CUSTOM_=secretName`. If the secret `secretName` contains `KEY_A`, the environment variable name is `CUSTOM_KEY_A`. + - To add environment variables for individual keys, use the format `NAME:KEY_A,KEY_B`. For example, to add an environment variable for a single key `key1` in a secret that is named `secretName`, use the value `secretName:key1`. To assign a different name to a referenced key, use the format `NAME:NEW_NAME=KEY_A`. For example, to add an environment variable named `myKey` for a single key `key1` in a secret that is named `secretName`, use the value `secretName:myKey=key1`. + + This value is optional. + + **`--env-from-secret-rm, --env-sec-rm`** + Remove environment variable references to full secrets by using the secret name. To remove individual key references to secrets, use the `--env-rm` option. This option can be specified multiple times. This value is optional. + + **`--env-rm`** + Remove environment variable references to the key of a key-value pair in a configmap or secret. To remove individual key references and literal values, specify the name of the key. This option can be specified multiple times. This value is optional. + + **Mount Options** + + **`--mount-configmap, --mount-cm`** + Add the contents of a configmap to the file system of your application container by providing a mount directory and the name of a configmap, with the format `MOUNT_DIRECTORY=CONFIGMAP_NAME`. Each mounted configmap must use a unique mount directory. For each key-value pair in the configmap, a file is added to the specified mount directory where the filename is the key and the contents of the file is the value of the key-value pair. Specify one mount configuration per `--mount-configmap` option; for example, `--mount-configmap /etc/config-a=config-a --mount-configmap /etc/config-b=config-b`. This value is optional. + + **`--mount-data-store, --mount-ds`** + Mount a persistent data store. The format is `MOUNT_DIRECTORY=STORAGE_NAME[:SUBPATH]`. The `SUBPATH` is optional. This option can be specified multiple times. This value is optional. + + **`--mount-secret, --mount-sec`** + Add the contents of a secret to the file system of your application container by providing a mount directory and the name of a secret, with the format `MOUNT_DIRECTORY=SECRET_NAME`. Each mounted secret must use a unique mount directory. For each key-value pair in the secret, a file is added to the specified mount directory where the filename is the key and the contents of the file is the value of the key-value pair. Specify one mount configuration per `--mount-secret` option; for example, `--mount-secret /etc/secret-a=secret--a --mount-secret /etc/secret-b=secret-b`. This value is optional. + + **`--mount-rm`** + Remove the contents of a configmap or secret from the file system of your application container by specifying the directory where the configmap or secret is mounted. Specify one mount directory per `--mount-rm` option; for example, `--mount-rm /etc/configmap-a --mount-rm /etc/secret-b`. This value is optional. + + **Network and Visibility Options** + + **`--cluster-local, --cl`** + Deploy the application with a project-only endpoint. Setting a project-only endpoint means that your app is not accessible from the public internet and network access is only possible from other Code Engine components that are running in the same project. This value is optional. The default value is `false`. + + **`--no-cluster-local, --ncl`** + Deploy the application with a public endpoint. The application deploys such that it can receive requests from the public internet or from components within the Code Engine project. This value is optional. The default value is `true`. + + **`--visibility, -v`** + The visibility for the application. Valid values are `public`, `private`, and `project`. Setting a visibility of `public` means that your app can receive requests from the public internet or from components within the Code Engine project. Setting a visibility of `private` means that your app is not accessible from the public internet and network access is only possible from other IBM Cloud using Virtual Private Endpoints (VPE) or Code Engine components that are running in the same project. Visibility can only be `private` if the project supports application private visibility. Setting a visibility of `project` means that your app is not accessible from the public internet and network access is only possible from other Code Engine components that are running in the same project. This value is optional. + + **Health Check Options** + + **`--probe-live, --pl`** + Configure the liveness probe for this application in `NAME=VALUE` format. Valid options for `NAME` are: `type`, `port`, `path`, `interval`, `initial-delay`, `timeout`, `failure-threshold`. This option can be specified multiple times. The `type` property is required and valid values are `tcp` and `http`. For example, `--probe-live type=tcp --probe-live port=8080`. For more information about working with probes, see Configuring probes for your app. This value is optional. + + **`--probe-live-clear, --plr`** + Remove the liveness probe. This option is allowed only if your app currently has a liveness probe. This value is optional. The default value is `false`. + + **`--probe-ready, --pr`** + Configure the readiness probe for this application in `NAME=VALUE` format. Valid options for `NAME` are: `type`, `port`, `path`, `interval`, `initial-delay`, `timeout`, `failure-threshold`. This option can be specified multiple times. The `type` property is required and valid values are `tcp` and `http`. For example, `--probe-ready type=tcp --probe-ready port=8080`. For more information about working with probes, see Configuring probes for your app. This value is optional. + + **`--probe-ready-reset, --prr`** + Resets the readiness probe to the default configuration. This value is optional. The default value is `false`. + + **Timeout Options** + + **`--request-timeout, --rt, --timeout, -t`** + The amount of time in seconds that can pass before requests made to the application must succeed or fail. This value is optional. The default value is `0`. + + **Security Options** + + **`--registry-secret, --rs`** + The name of the registry secret. The registry secret is used to authenticate with a private registry when you download the container image. This value is optional. + + **`--registry-secret-clear, --rsc`** + Clear the registry secret. This value is optional. The default value is `false`. + + **`--service-account, --sa`** + The name of the service account. A service account provides an identity for processes that run in an instance. For built-in service accounts, you can use the shortened names `manager`, `none`, `reader`, and `writer`. You can also use the full names that are prefixed with the Kubernetes Config Context, which can be determined with the `project current` command. This value is optional. + + **`--service-account-clear, --sac`** + Clear the service account. This value is optional. The default value is `false`. + + **`--trusted-profiles-enabled, --trusted, --tpe`** + Enable mounting of a compute resource token to the container of this application. This value is optional. The default value is `false`. + + **Execution Options** + + **`--force, -f`** + Do not verify the existence of specified configmap and secret references. Configmap references are specified with the `--env-from-configmap` or `--mount-configmap` options. Secret references are specified with the `--env-from-secret`, `--mount-secret` or `--registry-secret` options. This value is optional. The default value is `false`. + + **`--no-wait, --nw`** + Update the application and do not wait for the application to be ready. If you specify the `--no-wait` option, the application update begins and does not wait. Use the `app get` command to check the application status. This value is optional. The default value is `false`. + + **`--wait, -w`** + Update the application and wait for the application to be ready. If you specify the `--wait` option, the application update waits for a maximum time in seconds, as set by the `--wait-timeout` option, for the application to become ready. If the application is not ready within the specified `--wait-timeout` period, the application create fails. This value is optional. The default value is `true`. + + **`--wait-timeout, --wto`** + The length of time in seconds to wait for the application to be updated. This value is required if the `--wait` option is specified. This value is ignored if the `--no-wait` option is specified. The default value is `600`. + + **Output Options** + + **`--output, -o`** + Specifies the format of the command output. Valid values are `json`, `yaml`, `jsonpath=JSONPATH_EXPRESSION`, `jsonpath-as-json=JSONPATH_EXPRESSION`, `url`, and `project-url`. Use `jsonpath` to specify the path to an element of the JSON output. This value is optional. + + **`--quiet, -q`** + Specify this option to reduce the output of the command. This value is optional. The default value is `false`. + + **Revision Options** + + **`--rn, --revision-name`** + The name of the revision. Use a name that is unique within the application. + - The name can contain lowercase letters, numbers, and hyphens (`-`). + - The name must end with a lowercase alphanumeric character. + - The fully qualified revision name must be in the format, `Name_of_application-Name of revision`. + - The fully qualified revision name must be 63 characters or fewer. + + This value is optional. diff --git a/docs/Lab Tools/Cloud IDE/cloud-ide-kubernetes.md b/docs/Lab Tools/Cloud IDE/cloud-ide-kubernetes.md new file mode 100644 index 0000000..414eb43 --- /dev/null +++ b/docs/Lab Tools/Cloud IDE/cloud-ide-kubernetes.md @@ -0,0 +1,13 @@ +import CloudIDECommon from './_CloudIDECommon.mdx'; +import CodeEngine from './_CodeEngine.mdx' + +# Cloud IDE Kubernetes + +This learning environment is called "Cloud IDE with Kubernetes", it is Theia-based, offering functionalities like file/folder management, a terminal, and more. It operates on a Ubuntu foundation and is enabled for working with Docker and Kubernetes. + + + +--- + + + diff --git a/docs/Lab Tools/Cloud IDE/cloud-ide-openshift.md b/docs/Lab Tools/Cloud IDE/cloud-ide-openshift.md new file mode 100644 index 0000000..49d6271 --- /dev/null +++ b/docs/Lab Tools/Cloud IDE/cloud-ide-openshift.md @@ -0,0 +1,12 @@ +import CloudIDECommon from './_CloudIDECommon.mdx'; +import CodeEngine from './_CodeEngine.mdx' + +# Cloud IDE Openshift + +This learning environment is called "Cloud IDE with OpenShift", it is Theia-based, offering functionalities like file/folder management, a terminal, and more. It operates on a Ubuntu foundation and is enabled for working with Docker and OpenShift. + + + +--- + + \ No newline at end of file diff --git a/docs/Lab Tools/Cloud IDE/cloud-ide.md b/docs/Lab Tools/Cloud IDE/cloud-ide.md new file mode 100644 index 0000000..2453461 --- /dev/null +++ b/docs/Lab Tools/Cloud IDE/cloud-ide.md @@ -0,0 +1,10 @@ +import CloudIDECommon from './_CloudIDECommon.mdx'; +import CodeEngine from './_CodeEngine.mdx' + +# Cloud IDE + + + +--- + + \ No newline at end of file diff --git a/docs/Lab Tools/ai-classroom.md b/docs/Lab Tools/ai-classroom.md index 8967910..3be40a7 100644 --- a/docs/Lab Tools/ai-classroom.md +++ b/docs/Lab Tools/ai-classroom.md @@ -36,4 +36,67 @@ _Important Note: After sending the first message in a chatroom, learners cannot ### Usage Limits -Learners have a daily limit of $1 to use AI Classroom's language models. Once they reach this limit, they won't be able to get responses until the next day when the limit resets. \ No newline at end of file +Learners have a daily limit of $1 to use AI Classroom's language models. Once they reach this limit, they won't be able to get responses until the next day when the limit resets. + +Images generated by DALL-E and other image models expire after 2 hours. + +### Supported Models: + +**Anthropic** + - Claude 3 Haiku + - Claude 3.5 Sonnet (June 2024) + - Claude 3.5 Sonnet (October 2024) + - Claude 3.7 Sonnet + - Claude 3 Opus + - Claude 4 Opus + - Claude 4 Sonnet + +**DeepSeek Models** + - DeepSeek R1 + - DeepSeek V3 + - DeepSeek R1 Distill Llama 70B + - DeepSeek R1 Distill Qwen 14B + - DeepSeek R1 Distill Qwen 1.5B + +**Google Gemini/Gemma Models** + - Gemini 1.5 Flash + - Gemini 1.5 Flash 8B + - Gemini 2.0 Flash Lite + - Gemini 2.0 Flash Thinking Exp + - Gemma 3 1B IT + - Gemma 3 4B IT + - Gemma 3 12B IT + - Gemma 3 27B IT + +**Watsonx Models** + - Granite 3 8B Instruct + - Granite 8B Code Instruct + - Granite 3.2 8B Instruct + - Granite 3.3 8B Instruct + - Mistral Small 3.1 24B Instruct 2503 + - Mistral Large + - Mistral Medium 2505 + - Pixtral 12B + - Llama 3 405B Instruct + - Llama 3.2 1B Instruct + - Llama 3.2 3B Instruct + - Llama 3.3 70B Instruct + - Llama 4 Maverick 17B 128E Instruct + +**OpenAI Models** + - GPT-3.5 Turbo + - GPT-3.5 Turbo (Raw) + - GPT-4 Turbo + - GPT-4 Turbo (Raw) + - GPT-4o + - GPT-4o (Raw) + - GPT-4o Mini + - GPT-4o Mini (Raw) + - GPT-4.1 + - GPT-4.1 Mini + - GPT-4.1 Nano + - GPT-5 + - GPT-5 Mini + - GPT-5 Nano + - GPT-5 Chat Latest + - O3 Mini \ No newline at end of file diff --git a/docs/Lab Tools/cloud-ide-kubernetes.md b/docs/Lab Tools/cloud-ide-kubernetes.md deleted file mode 100644 index fdc2176..0000000 --- a/docs/Lab Tools/cloud-ide-kubernetes.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Cloud IDE Kubernetes - -This learning environment is called "Cloud IDE", it is Theia-based, offering functionalities like file/folder management, a terminal, and more. It operates on a Ubuntu foundation and is enabled for working with Docker and Kubernetes. - -### Layout - -#### Right side: -The Cloud IDE development environment resides here, providing the tools for code development and execution. - -#### Left side: -This area is divided into two sections: - - Tai's Chat Interface: This interface facilitates communication between the learner and Tai, featuring chat history, and learners' message input field. - - Lab instructions: These instructions guide learners through the learning activities and exercises. - -## Cloud IDE Features - -Cloud IDE empowers learners with a comprehensive IDE experience, including: - - File/folder management: Organize and manage files and folders efficiently. - - Terminal: Execute commands and interact with the underlying operating system. - - Docker and Kubernetes integration: The learner is provided both a Kubernetes namespace (with value `$SN_ICR_NAMESPACE`) and an ICR (IBM Container Registry) namespace (with the value `us.icr.io/$SN_ICR_NAMESPACE`) to store Docker images. - -#### Skills Network Toolbox: - -Within Cloud IDE, learners can access the Skills Network Toolbox by clicking the Skills Network Toolbox Icon button located on the left-hand side of the Cloud IDE menu bar. This toolbox offers a variety of tools to enhance the learning experience and facilitate completion of labs: - -- Databases - - MySQL - - PostgreSQL - - Cassandra - - MongoDB -- Big Data - - Apache Airflow -- Cloud - - Code Engine -- Embeddable AI - - Text-To-Speech - - Speech-To-Text - - Watson NLP - - Sentiment Analysis (BERT and CNN) - - Categories - - Classification - - Concepts - - Detag - - Emotion - - Keywords - - Lang-detect - - Noun-phrases - - Relations (Transformer) - - Syntax -- Launch Application - This is how you view the application you run within Cloud IDE. This will open a tab either within Cloud IDE or your browser diff --git a/docs/Lab Tools/cloud-ide-openshift.md b/docs/Lab Tools/cloud-ide-openshift.md deleted file mode 100644 index 9ff4016..0000000 --- a/docs/Lab Tools/cloud-ide-openshift.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Cloud IDE Openshift - -This learning environment is called "Cloud IDE", it is Theia-based, offering functionalities like file/folder management, a terminal, and more. It operates on a Ubuntu foundation and is enabled for working with Docker and OpenShift. - -### Layout - -#### Right side: -The Cloud IDE development environment resides here, providing the tools for code development and execution. - -#### Left side: -This area is divided into two sections: - - Tai's Chat Interface: This interface facilitates communication between the learner and Tai, featuring chat history, and learners' message input field. - - Lab instructions: These instructions guide learners through the learning activities and exercises. - -### Cloud IDE Features - -Cloud IDE empowers learners with a comprehensive IDE experience, including: - - File/folder management: Organize and manage files and folders efficiently. - - Terminal: Execute commands and interact with the underlying operating system. - - Docker and OpenShift integration: The learner is provided both an OpenShift Project (with value `$SN_ICR_NAMESPACE`) and an ICR (IBM Container Registry) namespace (with the value `us.icr.io/$SN_ICR_NAMESPACE`) to store Docker images. - -#### Skills Network Toolbox: - -Within Cloud IDE, learners can access the Skills Network Toolbox by clicking the Skills Network Toolbox Icon button located on the left-hand side of the Cloud IDE menu bar. This toolbox offers a variety of tools to enhance the learning experience and facilitate completion of labs: - -- Databases - - MySQL - - PostgreSQL - - Cassandra - - MongoDB -- Big Data - - Apache Airflow -- Cloud - - Code Engine -- Embeddable AI - - Text-To-Speech - - Speech-To-Text - - Watson NLP - - Sentiment Analysis (BERT and CNN) - - Categories - - Classification - - Concepts - - Detag - - Emotion - - Keywords - - Lang-detect - - Noun-phrases - - Relations (Transformer) - - Syntax -- Launch Application - This is how you view the application you run within Cloud IDE. This will open a tab either within Cloud IDE or your browser diff --git a/docs/Lab Tools/jupyterlab.md b/docs/Lab Tools/jupyterlab.md index 29772ae..3e5eb5a 100644 --- a/docs/Lab Tools/jupyterlab.md +++ b/docs/Lab Tools/jupyterlab.md @@ -20,4 +20,81 @@ It contains the lab instructions organized in code cells that you can interact w Tai is located on the left side of the JupyterLab interface. #### Description -Holds chat history between learner and Tai, and learner message input field \ No newline at end of file +Holds chat history between learner and Tai, and learner message input field + +### Supported AI Model + +#### Anthropic +| Model Name | Model ID | + |------------|----------| + | Claude 3.5 Sonnet | `claude-3-5-sonnet` | + | Claude 3 Opus | `claude-3-opus` | + | Claude 3 Haiku | `claude-3-haiku` | + | Claude 3.5 Sonnet (2025-02-19) | `claude-3-7-sonnet-20250219` | + | Claude Opus 4 (2025-05-14) | `claude-opus-4-20250514` | + | Claude Sonnet 4 (2025-05-14) | `claude-sonnet-4-20250514` | + +#### Watsonx AI Models + + | Model Name | Model ID | + |------------|----------| + | Granite 13B Chat v2 | `ibm/granite-13b-chat-v2` | + | Granite 7B Lab | `ibm/granite-7b-lab` | + | Granite 20B Multilingual | `ibm/granite-20b-multilingual` | + | Granite 20B Code Instruct | `ibm/granite-20b-code-instruct` | + | Granite 34B Code Instruct | `ibm/granite-34b-code-instruct` | + | MPT 7B Instruct 2 | `ibm/mpt-7b-instruct2` | + | Merlinite 7B | `ibm-mistralai/merlinite-7b` | + | Mixtral 8x7B Instruct v0.1 | `mistralai/mixtral-8x7b-instruct-v01`| + | Llama 3 8B Instruct | `meta-llama/llama-3-8b-instruct` | + | FLAN-T5-XL | `google/flan-t5-xl` | + | Llama 3.1 8B Instruct | `meta-llama/llama-3-1-8b-instruct` | + | Pixtral 12B | `mistralai/pixtral-12b` | + | CodeLlama 34B Instruct HF | `codellama/codellama-34b-instruct-hf`| + | Llama 3 70B Instruct | `meta-llama/llama-3-70b-instruct` | + | Llama 3.1 70B Instruct | `meta-llama/llama-3-1-70b-instruct` | + | Llama 3.3 70B Instruct | `meta-llama/llama-3-3-70b-instruct` | + | MT0-XXL | `bigscience/mt0-xxl` | + | StarCoder | `bigcode/starcoder` | + | FLAN-UL2 | `google/flan-ul2` | + | GPT-NeoX-20B | `eleutherai/gpt-neox-20b` | + | Llama 3 405B Instruct | `meta-llama/llama-3-405b-instruct` | + | SLATE 125M English RTRVR | `ibm/slate-125m-english-rtrvr` | + | SLATE 30M English RTRVR | `ibm/slate-30m-english-rtrvr` | + | Llama 3.2 90B Vision Instruct | `meta-llama/llama-3-2-90b-vision-instruct` | + | Llama 3.2 11B Vision Instruct | `meta-llama/llama-3-2-11b-vision-instruct` | + | Llama Guard 3 11B Vision | `llama-guard-3-11b-vision` | + | Llama 3.2 1B Instruct | `meta-llama/llama-3-2-1b-instruct` | + | Llama 3.2 3B Instruct | `meta-llama/llama-3-2-3b-instruct` | + | Granite 3 2B Instruct | `ibm/granite-3-2b-instruct` | + | Granite 3 8B Instruct | `ibm/granite-3-8b-instruct` | + | Granite 3.2 8B Instruct | `ibm/granite-3-2-8b-instruct` | + | Granite 3.3 8B Instruct | `ibm/granite-3-3-8b-instruct` | + | Mistral Small 3.1 24B Instruct | `mistralai/mistral-small-3-1-24b-instruct-2503` | + | Mistral Medium 2505 | `mistralai/mistral-medium-2505` | + | Llama 4 Maverick 17B | `meta-llama/llama-4-maverick-17b-128e-instruct-fp8` | + | Llama 4 Scout 17B | `meta-llama/llama-4-scout-17b-16e-instruct` | + +#### OpenAI + | Model Name | Model ID | + |------------|----------| + | GPT-5 | `gpt-5` | + | GPT-5 Mini | `gpt-5-mini` | + | GPT-5 Nano | `gpt-5-nano` | + | GPT-5 Chat Latest | `gpt-5-chat-latest` | + | O3 Mini | `o3-mini` | + | GPT-4.1 | `gpt-4.1` | + | GPT-4.1 Mini | `gpt-4.1-mini` | + | GPT-4.1 Nano | `gpt-4.1-nano` | + | GPT-4o Mini | `gpt-4o-mini` | + | GPT-4o | `gpt-4o` | + | GPT-4 Turbo | `gpt-4-turbo` | + | GPT-4 | `gpt-4` | + | GPT-3.5 Turbo | `gpt-3.5-turbo` | + | GPT-3.5 Turbo Instruct | `gpt-3.5-turbo-instruct` | + | GPT-4.5 Preview | `gpt-4.5-preview` | + | Text Embedding 3 Small | `text-embedding-3-small` | + | Text Embedding 3 Large | `text-embedding-3-large` | + | Text Embedding Ada 002 | `text-embedding-ada-002` | + | Davinci 002 (Image) | `davinci-002` | + | Babbage 002 (Image) | `babbage-002` | \ No newline at end of file diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index f7d74f3..66d3de6 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -45,13 +45,22 @@ in the lab's terminal (which you can quickly launch using `CTRL`+`SHIFT`+`` ` `` ### I can't open my application in the browser in Cloud IDE -1. Look for the **Skills Network Toolbox** icon at the bottom of the menu bar located on the left side of the IDE. +Once your live-server or app is running, follow these steps: -2. Then click on **"Launch Your Application"**. +1. **Open the Skills Network Toolbox** + - Look for the **Skills Network** icon (looks like a gray tree icon) at the bottom of the sidebar on the left side of the IDE. ![skills Network Icon looks like a gray tree with nodes at the end of the branches](/img/sn_toolbox.png) -3. In the "Application Port" field, enter the port number your application is running from the given instruction. +2. **Launch Application** + - Click on **"Launch Application"** tool. + +3. **Enter the Application Port** + - In the **"Application Port"** field, enter the port number your application is running on (as given in your instructions). + +4. **Open the Application** + - Click the **"Your Application"** button to open your app in the browser. + +> **Tip:** If your app doesn’t load, make sure your server is running and that you’ve entered the correct port number. -4. Click the **"Your Application"** button to open your application in the browser. ### `Port already in use` error when restarting server @@ -69,7 +78,7 @@ in the lab's terminal (which you can quickly launch using `CTRL`+`SHIFT`+`` ` `` ### I did not receive a grade or see completion marked for a lab I finished -Please note that **practice labs are ungraded** and are hence not marked as completed. +Please note that **practice labs are ungraded** and are hence not marked as completed (In Coursera "Ungraded App Items" will not be graded and may stay in the Results Pending state. These are practise labs and will not be graded.). If you're sure the lab was *not* for practice, then please submit a support ticket using Tai. ### I don't know how to mark my lab as complete @@ -148,6 +157,12 @@ If your lab has loaded successfully but you're experiencing issues with function - Try the troubleshooting steps from the [Lab not loading](#lab-not-loading-loading-sign-is-stagnant) section above - Contact support if the issue persists +### Kernel Status Unknown + +If the kernel status is unknown, then reset the kernel. To reset the kernel: + +- In the Jupyter menu, navigate to ```Kernel``` > ```Restart Kernel```. If this doesn't resolve the issue, try ```Kernel``` > ```Kernal and Clear...``` or ```Kernel``` > ```Restart Kernel and Run All```. + ## General troubleshooting :::info @@ -173,4 +188,12 @@ If your application fails to load or displays errors: - Check the terminal for any error messages - Ensure all required dependencies are installed - Restart your application and try again -- Otherwise, ask to open a support ticket \ No newline at end of file +- Otherwise, ask to open a support ticket + +### Problem with user session + +If you encounter an issue within your lab session, reset the lab: + +1. Click the **Reset Lab** button at the bottom of the left menu bar for instructions on how to reset the lab. +2. You will be instructed to **Log out** to complete the reset. +3. After logging out, reopen the lab. diff --git a/static/img/sn_toolbox.png b/static/img/sn_toolbox.png new file mode 100644 index 0000000..ec48bcd Binary files /dev/null and b/static/img/sn_toolbox.png differ