Skip to content

Commit

Permalink
Merge pull request #358 from Qovery/update_cli_shell_doc
Browse files Browse the repository at this point in the history
add CLI shell documentation
  • Loading branch information
jul-dan authored Dec 21, 2023
2 parents cb09e65 + ad405d2 commit 245476a
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
---
last_modified_on: "2023-12-20"
last_modified_on: "2023-12-21"
title: "Cloud Service Provider"
description: "Learn how to configure and plug in your Cloud Account"
sidebar_label: hidden
hide_pagination: true
---

import Jump from '@site/src/components/Jump';

<Jump to="/docs/using-qovery/configuration/cloud-service-provider/amazon-web-services/">Amazon web services</Jump>
<Jump to="/docs/using-qovery/configuration/cloud-service-provider/digital-ocean/">Digital ocean</Jump>
<Jump to="/docs/using-qovery/configuration/cloud-service-provider/google-cloud-platform/">Google cloud platform</Jump>
<Jump to="/docs/using-qovery/configuration/cloud-service-provider/microsoft-azure/">Microsoft azure</Jump>
<Jump to="/docs/using-qovery/configuration/cloud-service-provider/other-csps/">Other csps</Jump>
<Jump to="/docs/using-qovery/configuration/cloud-service-provider/scaleway/">Scaleway</Jump>

<!--
THIS FILE IS AUTOGENERATED!
Expand Down
76 changes: 73 additions & 3 deletions website/docs/using-qovery/interface/cli.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_on: "2023-08-04"
last_modified_on: "2023-12-21"
title: CLI
description: How to use the Qovery CLI (Command Line Interface)
---
Expand Down Expand Up @@ -370,12 +370,82 @@ lib sbin
Keep in mind these limitations when using this feature:
<ul>
<li>Install a process reaper as pid one in your container (i.e: dumb-init), as you may leave zoombie process in your container if your shell terminate unproperly (i.e: ctrl+c, cnx restart). This is a known issue with kubernetes exec to leave process alive after attach is closed;</li>
<li>if your application is configured to run with more than one instance, you will be able to connect only to the oldest POD running one of your instances;</li>
<li>shell is force closed after [1 hour, 10Mb transmitted];</li>
<li>shell is force closed after [1 hour, 1GB transmitted];</li>
<li>we use SH by default. To have auto-completion, start bash.</li>
</ul>
</Alert>

<Alert type="info">
The width of the terminal is limited to 80 characters. But you can resize it once you are inside the application with one of these commands:

```bash
COLUMNS=200 tput init
stty cols 200
```

</Alert>

### Pass a command

To pass a command, you can use the `--command` or `-c` argument followed by your command.

```bash
$ qovery shell --command ls
bin media srv
dev mnt sys
docker-entrypoint.d opt tmp
docker-entrypoint.sh proc usr
etc root var
home run www
lib sbin
```

To pass several arguments, you can separate them with a comma or send different `--command`.

`qovery shell --command ls --command -l`
`qovery shell --command ls,-l`
`qovery shell -c ls,-l`

```bash
$ qovery shell --command ls --command -l
drwxr-xr-x 2 root root 4096 Nov 30 09:32 bin
drwxr-xr-x 5 root root 360 Dec 21 09:46 dev
drwxr-xr-x 1 root root 41 Dec 20 20:13 docker-entrypoint.d
-rwxr-xr-x 1 root root 1620 Dec 20 20:13 docker-entrypoint.sh
drwxr-xr-x 1 root root 25 Dec 21 09:46 etc
drwxr-xr-x 2 root root 6 Nov 30 09:32 home
drwxr-xr-x 1 root root 61 Dec 20 22:11 lib
drwxr-xr-x 5 root root 44 Nov 30 09:32 media
drwxr-xr-x 2 root root 6 Nov 30 09:32 mnt
drwxr-xr-x 2 root root 6 Nov 30 09:32 opt
dr-xr-xr-x 209 root root 0 Dec 21 09:46 proc
drwx------ 1 root root 26 Dec 21 10:38 root
drwxr-xr-x 1 root root 23 Dec 21 09:46 run
drwxr-xr-x 2 root root 4096 Nov 30 09:32 sbin
drwxr-xr-x 2 root root 6 Nov 30 09:32 srv
dr-xr-xr-x 13 root root 0 Dec 21 09:46 sys
drwxrwxrwt 2 root root 6 Nov 30 09:32 tmp
drwxr-xr-x 1 root root 66 Nov 30 09:32 usr
drwxr-xr-x 1 root root 19 Nov 30 09:32 var
drwxr-xr-x 2 root root 59 Dec 21 09:45 www
```

### Shell in a dedicated pod

If your application is running on several pods, you can shell directly in a dedicated one by using the `--pod` or `-p` argument followed by your pod name.

```bash
$ qovery shell --pod app-5f65fb5c4-frontend-5f65db5c4b-q4w11
```

### Shell in a dedicated container

If you have several containers in your pod, you can shell directly in a dedicated one by using the `--container` argument followed by your container name.

```bash
$ qovery shell --container app-5f65fb5c4-frontend
```

## Generate API token

To use the Qovery API you will need to generate an authentication token. To generate an API token you can install the CLI and type
Expand Down
74 changes: 72 additions & 2 deletions website/docs/using-qovery/interface/cli.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,82 @@ lib sbin
Keep in mind these limitations when using this feature:
<ul>
<li>Install a process reaper as pid one in your container (i.e: dumb-init), as you may leave zoombie process in your container if your shell terminate unproperly (i.e: ctrl+c, cnx restart). This is a known issue with kubernetes exec to leave process alive after attach is closed;</li>
<li>if your application is configured to run with more than one instance, you will be able to connect only to the oldest POD running one of your instances;</li>
<li>shell is force closed after [1 hour, 10Mb transmitted];</li>
<li>shell is force closed after [1 hour, 1GB transmitted];</li>
<li>we use SH by default. To have auto-completion, start bash.</li>
</ul>
</Alert>

<Alert type="info">
The width of the terminal is limited to 80 characters. But you can resize it once you are inside the application with one of these commands:

```bash
COLUMNS=200 tput init
stty cols 200
```

</Alert>

### Pass a command

To pass a command, you can use the `--command` or `-c` argument followed by your command.

```bash
$ qovery shell --command ls
bin media srv
dev mnt sys
docker-entrypoint.d opt tmp
docker-entrypoint.sh proc usr
etc root var
home run www
lib sbin
```

To pass several arguments, you can separate them with a comma or send different `--command`.

`qovery shell --command ls --command -l`
`qovery shell --command ls,-l`
`qovery shell -c ls,-l`

```bash
$ qovery shell --command ls --command -l
drwxr-xr-x 2 root root 4096 Nov 30 09:32 bin
drwxr-xr-x 5 root root 360 Dec 21 09:46 dev
drwxr-xr-x 1 root root 41 Dec 20 20:13 docker-entrypoint.d
-rwxr-xr-x 1 root root 1620 Dec 20 20:13 docker-entrypoint.sh
drwxr-xr-x 1 root root 25 Dec 21 09:46 etc
drwxr-xr-x 2 root root 6 Nov 30 09:32 home
drwxr-xr-x 1 root root 61 Dec 20 22:11 lib
drwxr-xr-x 5 root root 44 Nov 30 09:32 media
drwxr-xr-x 2 root root 6 Nov 30 09:32 mnt
drwxr-xr-x 2 root root 6 Nov 30 09:32 opt
dr-xr-xr-x 209 root root 0 Dec 21 09:46 proc
drwx------ 1 root root 26 Dec 21 10:38 root
drwxr-xr-x 1 root root 23 Dec 21 09:46 run
drwxr-xr-x 2 root root 4096 Nov 30 09:32 sbin
drwxr-xr-x 2 root root 6 Nov 30 09:32 srv
dr-xr-xr-x 13 root root 0 Dec 21 09:46 sys
drwxrwxrwt 2 root root 6 Nov 30 09:32 tmp
drwxr-xr-x 1 root root 66 Nov 30 09:32 usr
drwxr-xr-x 1 root root 19 Nov 30 09:32 var
drwxr-xr-x 2 root root 59 Dec 21 09:45 www
```

### Shell in a dedicated pod

If your application is running on several pods, you can shell directly in a dedicated one by using the `--pod` or `-p` argument followed by your pod name.

```bash
$ qovery shell --pod app-5f65fb5c4-frontend-5f65db5c4b-q4w11
```

### Shell in a dedicated container

If you have several containers in your pod, you can shell directly in a dedicated one by using the `--container` argument followed by your container name.

```bash
$ qovery shell --container app-5f65fb5c4-frontend
```

## Generate API token

To use the Qovery API you will need to generate an authentication token. To generate an API token you can install the CLI and type
Expand Down

0 comments on commit 245476a

Please sign in to comment.