From 5d92e85cac06132f7d0e1de24b39b48b9fd9d877 Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Fri, 19 Mar 2021 13:23:42 -0500 Subject: [PATCH] Fix code fencing --- admin/access-control/password-reset.md | 2 +- admin/environment-management/cvms.md | 4 ++-- cli/file-sync.md | 8 ++++---- cli/installation.md | 4 ++-- environments/personalization.md | 4 ++-- environments/ssh.md | 4 ++-- environments/variables.md | 2 +- guides/admin/helm-charts.md | 4 ++-- guides/customization/custom-env.md | 8 ++++---- guides/deployments/nightly-releases.md | 8 ++++---- guides/deployments/teardown.md | 20 ++++++++++---------- guides/mobile-development/index.md | 8 ++++---- guides/ssl-certificates/cloudflare.md | 6 +++--- images/configure.md | 6 +++--- setup/air-gapped.md | 8 ++++---- setup/installation.md | 12 ++++++------ setup/kubernetes/aws.md | 18 +++++++++--------- setup/kubernetes/azure.md | 14 +++++++------- setup/kubernetes/google.md | 4 ++-- setup/kubernetes/local-preview.md | 6 +++--- setup/updating.md | 16 ++++++++-------- 21 files changed, 83 insertions(+), 83 deletions(-) diff --git a/admin/access-control/password-reset.md b/admin/access-control/password-reset.md index f77ef705f..e0c0c0e77 100644 --- a/admin/access-control/password-reset.md +++ b/admin/access-control/password-reset.md @@ -30,7 +30,7 @@ cemanager's **reset-admin-password** command. To reset the password, run the following in the terminal: -```bash +```console # get any cemanager pod kubectl get pods | grep cemanager- | awk '{print $1}' | head -n1 diff --git a/admin/environment-management/cvms.md b/admin/environment-management/cvms.md index 30aa67c6c..c1efb5194 100644 --- a/admin/environment-management/cvms.md +++ b/admin/environment-management/cvms.md @@ -42,7 +42,7 @@ the following parameters: You can also provide `latest` instead of specific version numbers. For example: -```bash +```console gcloud beta container clusters create "YOUR_NEW_CLUSTER" \ --node-version "latest" \ --cluster-version "latest" \ @@ -82,7 +82,7 @@ and updating your `eksctl` config spec. 2. Create your nodegroup (be sure to provide the correct file name): - ```bash + ```console eksctl create nodegroup --config-file=coder-node.yaml ``` diff --git a/cli/file-sync.md b/cli/file-sync.md index 317472151..42b3ca5e4 100644 --- a/cli/file-sync.md +++ b/cli/file-sync.md @@ -16,7 +16,7 @@ local machine and Coder environment. 1. To establish a one-way directory sync to a remote environment: - ```bash + ```console coder sync [local directory] [:] ``` @@ -27,7 +27,7 @@ local machine and Coder environment. To sync your local directory **~/Projects/cdr/coder-cli** to **coder-cli** in the home directory of your environment: -```bash +```console $ coder sync ~/Projects/cdr/coder-cli my-env:coder-cli 2020-05-19 17:57:40 INFO doing initial sync (~/Projects/cdr/coder-cli -> coder-cli) 2020-05-19 17:57:41 SUCCESS finished initial sync (878ms) @@ -45,7 +45,7 @@ help ensure your project is in the same state no matter where you make changes. 1. Log into Coder and configure your local SSH client: - ```bash + ```console $ coder login https://coder.yourcompany.com 2020-10-20 11:16:29 SUCCESS Logged in. $ coder config-ssh @@ -61,7 +61,7 @@ help ensure your project is in the same state no matter where you make changes. session. Note that the folder must exist on the remote server before you begin this step: - ```bash + ```console $ cd ~/my-project $ coder envs ls Name ImageTag CPUCores MemoryGB DiskGB GPUs Updating Status diff --git a/cli/installation.md b/cli/installation.md index d78181ec9..8773b182e 100644 --- a/cli/installation.md +++ b/cli/installation.md @@ -36,7 +36,7 @@ Download releases [from Github](https://github.com/cdr/coder-cli/releases): Once you've installed the CLI, authenticate the client with your Coder account. -```bash +```console coder login [https://coder.domain.com] ``` @@ -51,7 +51,7 @@ such as in CI/CD pipelines, the Coder CLI can also be authenticated with the Generate a static authentication token with the following command: -```bash +```console coder tokens create my-token ``` diff --git a/environments/personalization.md b/environments/personalization.md index 6bfe90eaf..caf4fa238 100644 --- a/environments/personalization.md +++ b/environments/personalization.md @@ -32,7 +32,7 @@ instructions in your `~/personalize` script. Whenever Coder rebuilds your environment, it runs your `~/personalize` script, installs `fish`, and changes the default shell. -```bash +```console #!/bin/bash echo "--Starting personalize" @@ -44,7 +44,7 @@ sudo chsh -s /usr/bin/fish $USER The following is a more extensive example of a `~/personalize` script: -```bash +```console #!/bin/bash ########################################################################### diff --git a/environments/ssh.md b/environments/ssh.md index a7f16b5c9..af63abe32 100644 --- a/environments/ssh.md +++ b/environments/ssh.md @@ -15,7 +15,7 @@ Before using, configuring, and accessing your environment via SSH: You can access your environments via SSH by configuring your local machine as follows: -```bash +```console $ coder config-ssh An auto-generated ssh config was written to "/Users/yourName/.ssh/config" @@ -49,6 +49,6 @@ To do so, use the flag `-e "coder sh"` in your `rsync` transfer invokation. For example, the following shows how you can transfer your home directory to your environment: -```bash +```console rsync -e "coder sh" -a --progress ~/. my-env:~ ``` diff --git a/environments/variables.md b/environments/variables.md index 90500a449..975b586c3 100644 --- a/environments/variables.md +++ b/environments/variables.md @@ -9,7 +9,7 @@ contextual information about your environment. To obtain a list of environment variables and their values, launch the **Terminal** via the Coder Dashboard and run: -```bash +```console env | grep CODER_ ``` diff --git a/guides/admin/helm-charts.md b/guides/admin/helm-charts.md index c0f2a24e5..318a3c20f 100644 --- a/guides/admin/helm-charts.md +++ b/guides/admin/helm-charts.md @@ -12,7 +12,7 @@ Coder's helm chart. 1. Get a copy of your existing helm chart and save it as `values.yaml` - ```bash + ```console helm show values coder/coder > values.yaml ``` @@ -28,7 +28,7 @@ Coder's helm chart. replace the placeholder value in the following command with your Coder version): - ```bash + ```console helm upgrade coder coder/coder -n coder --version= -f values.yaml ``` diff --git a/guides/customization/custom-env.md b/guides/customization/custom-env.md index 60ed88ea1..e4d61a0e8 100644 --- a/guides/customization/custom-env.md +++ b/guides/customization/custom-env.md @@ -128,11 +128,11 @@ Docker registry. To do so, run the following command in the directory where your Dockerfile is located (be sure to replace the placeholder values with your tag and repository name so that the image is pushed to the appropriate location): -```bash +```console docker build -t coderenterprise/react . ``` -```bash +```console docker push coderenterprise/react ``` @@ -174,7 +174,7 @@ creators. To do this, go to the **Environments** page of your Coder deployment and click **Terminal**. Run the following to create the skeleton for your application: -```bash +```console npx create-react-app coder-app ``` @@ -189,7 +189,7 @@ development server so that you can preview the changes you make to your project. You can switch into your app's directory and start the React development server (which listens on port 3000) using the Coder deployment's Terminal: -```bash +```console cd coder-app yarn start ``` diff --git a/guides/deployments/nightly-releases.md b/guides/deployments/nightly-releases.md index f300b1946..eda8e8ed8 100644 --- a/guides/deployments/nightly-releases.md +++ b/guides/deployments/nightly-releases.md @@ -35,7 +35,7 @@ automatically prune old nightly releases, so you'll see a maximum of 100 entries. The easiest way to view the [index](https://helm-nightly.coder.com/index.yaml) is to obtain it using curl: -```bash +```console $ curl https://helm-nightly.coder.com/index.yaml apiVersion: v1 @@ -64,7 +64,7 @@ crucial that you provide the entire version string to us. For automation purposes, you can use the following one-liner to get the current nightly version: -```bash +```console # Requires curl, yq, jq $ curl -sS https://helm-nightly.coder.com/index.yaml \ | yq r --tojson - \ @@ -77,7 +77,7 @@ $ curl -sS https://helm-nightly.coder.com/index.yaml \ 1. Add the Helm repo (if you haven't already): - ```bash + ```console $ helm repo add coder-nightly https://helm-nightly.coder.com "coder-nightly" has been added to your repositories ``` @@ -85,7 +85,7 @@ $ curl -sS https://helm-nightly.coder.com/index.yaml \ 1. Install a specific version to the coder namespace (be sure to backup your database before running the following command): - ```bash + ```console $ helm upgrade --namespace coder coder coder-nightly/coder \ --version --atomic --install diff --git a/guides/deployments/teardown.md b/guides/deployments/teardown.md index 2907408b0..ac8ddc1c8 100644 --- a/guides/deployments/teardown.md +++ b/guides/deployments/teardown.md @@ -15,25 +15,25 @@ Coder services but retains environments and their associated disk space. 1. Make sure you're running `eksctl` version 0.37.0 or later: - ```bash + ```console eksctl version ``` 1. List all of the services in your cluster: - ```bash + ```console kubectl get svc --all-namespaces ``` 1. Delete any services that have an `EXTERNAL-IP` value in your namespace: - ```bash + ```console kubectl delete svc ``` 1. Delete the cluster and its underlying nodes: - ```bash + ```console eksctl delete cluster --name ``` @@ -42,19 +42,19 @@ Coder services but retains environments and their associated disk space. 1. Make sure that the environment variable for `RESOURCE_GROUP` is set to the one you want to delete in Azure: - ```bash + ```console echo $RESOURCE_GROUP ``` If the variable is incorrect, fix it by setting it to the proper value: - ```bash + ```console RESOURCE_GROUP="" ``` 1. Delete the cluster: - ```bash + ```console az group delete --resource-group $RESOURCE_GROUP ``` @@ -63,7 +63,7 @@ Coder services but retains environments and their associated disk space. 1. Ensure that the environment variables for `PROJECT_ID` and `CLUSTER_NAME` are set to those for the cluster you want to delete: - ```bash + ```console echo $PROJECT_ID echo $CLUSTER_NAME ``` @@ -71,14 +71,14 @@ Coder services but retains environments and their associated disk space. If these values are incorrect, you can fix this by providing the proper names: - ```bash + ```console PROJECT_ID="" \ CLUSTER_NAME="" ``` 1. Delete the cluster: - ```bash + ```console gcloud beta container --project $PROJECT_ID clusters delete \ $CLUSTER_NAME --zone ``` diff --git a/guides/mobile-development/index.md b/guides/mobile-development/index.md index 0eae0e767..284ae6964 100644 --- a/guides/mobile-development/index.md +++ b/guides/mobile-development/index.md @@ -29,7 +29,7 @@ developed remotely on Coder. 1. Start the Android Debug Server on port 5555: - ```bash + ```console $ $ANDROID_SDK_PATH/platform-tools/adb tcpip 5555 restarting in TCP mode port: 5555 ``` @@ -46,7 +46,7 @@ developed remotely on Coder. 1. Forward your Android Debug Server to the remote environment: - ```bash + ```console # You must have the Coder CLI installed. $ coder config-ssh $ ssh -R 5555:127.0.0.1:5555 coder. @@ -54,7 +54,7 @@ developed remotely on Coder. 1. Run `adb devices` to view the emulators forwarded from your local machine: - ```bash + ```console $ adb devices List of devices attached emulator-5556 @@ -62,6 +62,6 @@ developed remotely on Coder. 1. Build and run your Android applications remotely: - ```bash + ```console ./gradlew android:installDebug ``` diff --git a/guides/ssl-certificates/cloudflare.md b/guides/ssl-certificates/cloudflare.md index 35f516c12..60c00d887 100644 --- a/guides/ssl-certificates/cloudflare.md +++ b/guides/ssl-certificates/cloudflare.md @@ -25,7 +25,7 @@ You must have: ## Step 1: Add cert-manager to Your Kubernetes Cluster -```bash +```console # Kubernetes 1.16+ $ kubectl apply --validate=false -f \ https://github.com/jetstack/cert-manager/releases/download/v1.0.1/cert-manager.yaml @@ -41,7 +41,7 @@ https://github.com/jetstack/cert-manager/releases/download/v1.0.1/cert-manager-l Once you've started the installation process, you can verify that all the pods are running: -```bash +```console $ kubectl get pods -n cert-manager NAME READY STATUS RESTARTS AGE @@ -144,7 +144,7 @@ Issuers](https://docs.cert-manager.io/en/release-0.8/tasks/issuers/index.html). Read the comments and fill out the blanks. Once you're done, you can go ahead and apply that to your cluster using: -```bash +```console $ kubectl apply -f issuer.yaml secret/cloudflare-api-key-secret created diff --git a/images/configure.md b/images/configure.md index fb33d158b..69c37e8fa 100644 --- a/images/configure.md +++ b/images/configure.md @@ -26,7 +26,7 @@ Using the text editor of your choice, create a file named `configure` and add the instructions that you want included. For example, the following file shows how you can clone a repo at build time: -```bash +```console #!/bin/bash if [ ! -d "/home/coder/workspace/project" ] then @@ -69,13 +69,13 @@ Dockerfile is located (be sure to replace the cdr/config placeholder value with your tag and repository name so that the image is pushed to the appropriate location): -```bash +```console docker build cdr/config . ``` Once you've built the image, push the image to the Docker registry: -```bash +```console docker push cdr/config ``` diff --git a/setup/air-gapped.md b/setup/air-gapped.md index ad8df531c..7d2035ada 100644 --- a/setup/air-gapped.md +++ b/setup/air-gapped.md @@ -29,7 +29,7 @@ platform images are hosted in Coder's Docker Hub repo. 1. Pull down the Coder helm charts by running the following in a non-air-gapped environment: - ```bash + ```console helm repo add coder https://helm.coder.com helm pull coder/coder ``` @@ -54,7 +54,7 @@ platform images are hosted in Coder's Docker Hub repo. `coderenvs/:` registry location using the image's name and Coder version: - ```bash + ```console docker pull coderenvs/coder-service: ``` @@ -62,7 +62,7 @@ platform images are hosted in Coder's Docker Hub repo. your internal registry; this registry must be accessible from your air-gapped environment. For example, to push `coder-service`: - ```bash + ```console docker tag coderenvs/coder-service: my-registry.com/coderenvs/coder-service: docker push my-registry.com/coderenvs/coder-service: ``` @@ -70,7 +70,7 @@ platform images are hosted in Coder's Docker Hub repo. 3. Once all of the resources are in your air-gapped network, run the following to deploy Coder to your Kubernetes cluster: - ```bash + ```console kubectl create namespace coder helm --namespace coder install coder /path/to/coder-X.Y.Z.tgz \ --set cemanager.image=my-registry.com/coderenvs/coder-service: \ diff --git a/setup/installation.md b/setup/installation.md index 0cf3660a5..25d8d8317 100644 --- a/setup/installation.md +++ b/setup/installation.md @@ -23,13 +23,13 @@ We recommend running Coder in a separate [namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/); to do so, run -```bash +```console kubectl create namespace coder ``` Next, change the kubectl context to point to your newly created namespace: -```bash +```console kubectl config set-context --current --namespace=coder ``` @@ -37,7 +37,7 @@ kubectl config set-context --current --namespace=coder 1. Add the Coder helm repo - ```bash + ```console helm repo add coder https://helm.coder.com ``` @@ -45,7 +45,7 @@ kubectl config set-context --current --namespace=coder [changelog](../changelog/index.md) for a list of Coder versions or run `helm search repo coder -l`) - ```bash + ```console helm install coder coder/coder --namespace coder ``` @@ -96,7 +96,7 @@ kubectl config set-context --current --namespace=coder 6. After you've created the pod, tail the logs to find the randomly generated password for the admin user - ```bash + ```console kubectl logs -n coder -l coder.deployment=cemanager -c cemanager \ --tail=-1 | grep -A1 -B2 Password ``` @@ -121,7 +121,7 @@ kubectl config set-context --current --namespace=coder 1. To access Coder's web UI, you'll need to get its IP address by running the following in the terminal to list the Kubernetes services running: - ```bash + ```console kubectl --namespace coder get services ``` diff --git a/setup/kubernetes/aws.md b/setup/kubernetes/aws.md index 7d6d2a536..98fc33972 100644 --- a/setup/kubernetes/aws.md +++ b/setup/kubernetes/aws.md @@ -64,7 +64,7 @@ The following will spin up a Kubernetes cluster using the `eksctl`; replace the parameters and environment variables as needed to reflect those for your environment. -```bash +```console CLUSTER_NAME="YOUR_CLUSTER_NAME" \ SSH_KEY_PATH=".pub" REGION="YOUR_REGION" \ eksctl create cluster \ @@ -87,7 +87,7 @@ size](https://aws.amazon.com/ec2/instance-types/t3/) instead. When your cluster is ready, you should see the following message: -```bash +```console EKS cluster "YOUR_CLUSTER_NAME" in "YOUR_REGION" region is ready ``` @@ -98,20 +98,20 @@ support immediate volume binding. 1. Make sure that you're pointed to the correct context: - ```bash + ```console kubectl config current-context ``` 2. If you're pointed to the correct context, delete the gp2 storage class: - ```bash + ```console kubectl delete sc gp2 ``` 3. Recreate the gp2 storage class with the `volumeBindingMode` set to `Immediate`: - ```bash + ```console cat <" as current context in /Users//.kube/config ``` diff --git a/setup/kubernetes/google.md b/setup/kubernetes/google.md index 4437e9994..b8702e8bf 100644 --- a/setup/kubernetes/google.md +++ b/setup/kubernetes/google.md @@ -18,7 +18,7 @@ The following will spin up a Kubernetes cluster using the `gcloud` command (be sure to replace the parameters (specifically `PROJECT_ID`, `NEW_CLUSTER_NAME`, and `ZONE`) as needed to reflect the needs of your environment). -```bash +```console gcloud beta container --project "$PROJECT_ID" \ clusters create "$NEW_CLUSTER_NAME" \ --zone "$ZONE" \ @@ -49,7 +49,7 @@ clusters create "$NEW_CLUSTER_NAME" \ To create clusters capable of supporting use of the [CVMs](../../admin/environment-management/cvms.md) deployment option: -```bash +```console gcloud beta container --project "$PROJECT_ID" \ clusters create "$NEW_CLUSTER_NAME" \ --zone "$ZONE" \ diff --git a/setup/kubernetes/local-preview.md b/setup/kubernetes/local-preview.md index bec66b526..70ed8f1c8 100644 --- a/setup/kubernetes/local-preview.md +++ b/setup/kubernetes/local-preview.md @@ -33,7 +33,7 @@ apply): version installed. You should see the following folders all corresponding to your Kernel version: - ```bash + ```console $ uname -r 5.11.4-arch1-1 $ ls /usr/lib/modules @@ -58,7 +58,7 @@ We are working on bringing Dev URL support to local previews in later releases. To install Coder, run: -```bash +```console curl -fsSL https://coder.com/try.sh | PORT="8080" sh -s -- ``` @@ -89,7 +89,7 @@ automatically configured for you, so there's no first-time setup to do. To remove the local Coder deployment, run: -```bash +```console curl -fsSL https://coder.com/try.sh | sh -s -- down ``` diff --git a/setup/updating.md b/setup/updating.md index 52b8209bc..1e1393b35 100644 --- a/setup/updating.md +++ b/setup/updating.md @@ -13,7 +13,7 @@ Before beginning the update process, please make sure that you've added the Coder helm repo to your cluster. You can verify that the Coder repo has been added to helm using `helm repo list`: -```bash +```console $ helm repo list NAME URL coder https://helm.coder.com @@ -21,7 +21,7 @@ coder https://helm.coder.com If you don't have the Coder repo, you can add it: -```bash +```console helm repo add coder https://helm.coder.com ``` @@ -45,13 +45,13 @@ To update Coder, follow these steps: 1. Retrieve the latest repository information: - ```bash + ```console helm repo update ``` 1. (Optional) Export the current helm chart values into a file: - ```bash + ```console helm get values --namespace coder coder > current-values.yml ``` @@ -63,7 +63,7 @@ To update Coder, follow these steps: *Note: If you omit --version, you'll upgrade to the latest version.* - ```bash + ```console helm upgrade --namespace coder --install --atomic --wait \ --version 1.16.1 coder coder/coder --values current-values.yml ``` @@ -95,7 +95,7 @@ If this happens, we recommend uninstalling and reinstalling: 1. Export the helm chart values into a file: - ```bash + ```console helm get values --namespace coder coder > current-values.yml ``` @@ -103,7 +103,7 @@ If this happens, we recommend uninstalling and reinstalling: 1. Run `helm uninstall`: - ```bash + ```console helm uninstall --namespace coder coder ``` @@ -120,7 +120,7 @@ If this happens, we recommend uninstalling and reinstalling: 1. Run the `upgrade` command with the new version number and helm chart values file: - ```bash + ```console helm upgrade --namespace coder --atomic \ --wait --install --version 1.16.1 \ coder coder/coder --values current-values.yml