Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
wip(zcli): service commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mlc-mlapis committed Oct 8, 2022
1 parent 7a13cc8 commit 0a3b699
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Backup and Restore of Databases

You can securely access your database service using the [VPN](/documentation/cli/vpn.html) built into our [zCLI](/documentation/cli/installation-authorization.html). You can then use any of the tools provided by the database vendor or third-party tools ([MariaDB](/documentation/services/databases/mariadb.html#how-to-backup-restore-database-data), [PostgreSQL](/documentation/services/databases/postgresql.html#how-to-backup-restore-database-data), or [KeyDB](/documentation/services/databases/keydb.html#how-to-backup-restore-database-data)).
You can securely access your database service using the [VPN](/documentation/cli/vpn.html) built into our [zCLI](/documentation/cli/installation-authorization.html). You can then use any of the tools provided by the database vendor or third-party tools ([MariaDB](/documentation/services/databases/mariadb.html#how-to-backup-or-restore-database-data), [PostgreSQL](/documentation/services/databases/postgresql.html#how-to-backup-or-restore-database-data), or [KeyDB](/documentation/services/databases/keydb.html#how-to-backup-or-restore-database-data)).

This can be used to dump data for use in a locally running database or when migrating away from Zerops. You can also utilize it to initially restore data to Zerops.

Expand Down
2 changes: 1 addition & 1 deletion src/documentation/build/build-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ List the Zerops technologies your build uses as the **Zerops build base image**

#### Supported base images

##### `nodejs@<12, 14, 16>`
##### `nodejs@<14, 16>`

Includes `npm`, `yarn`, `git`, `npx`.

Expand Down
8 changes: 8 additions & 0 deletions src/documentation/cli/available-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,11 @@ You must enclose the version name in quotes if it contains a space.
```bash
zcli deploy myproject myservice --versionName=v0.0.1 ./dist/app/~/
```

## `service [command]`

It represents a group of commands for managing individual Zerops services. Generally, there are the following commands:

[`import`](#import-project-name-or-project-id-path-to-import-script-file) Allows creating one or more Zerops services in an existing project via [import scripts](/documentation/export-import/project-service-export-import.html#services).

### `import [project name or project id] [path to import script file]`
4 changes: 0 additions & 4 deletions src/documentation/environment-variables/helper-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ use. They cannot be deleted, their keys cannot be changed and those marked with

🔒 Unique subdomain of Zerops, i.e. `my-app-30001.app.zerops.io`, this variable is always available, but subdomain access has to be enabled inside the service routing settings.

* `startCommand`

Command used for running the user defined application which corresponds to the command filled when creating a service.

## PHP/Nginx

* `hostname`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Export & import of Zerops projects and services structure

Zerops export and import functionality can be used to make a copy of an existing project/service or as an alternative to adding a new project/service manually through the Zerops GUI. It is important to note that only structure, configuration, and environment variables are exported/imported. Restoring application data related to databases ([PostgreSQL](/documentation/services/databases/postgresql.html#how-to-backup-restore-database-data), [MariaDB](/documentation/services/databases/mariadb.html#how-to-backup-restore-database-data), [KeyDB](/documentation/services/databases/keydb.html#how-to-backup-restore-database-data)), storage ([Object Storage](/documentation/services/storage/s3.html#using-rclone-as-a-local-management-tool), Shared Storage), and engines ([RabbitMQ](/documentation/services/message-brokers/rabbitmq.html#how-to-backup-restore-queues-data)), deploying applications, and setting up [public routing](/documentation/routing/using-your-domain.html) is up to the specific user.
Zerops export and import functionality can be used to make a copy of an existing project/service or as an alternative to adding a new project/service manually through the Zerops GUI. It is important to note that only structure, configuration, and environment variables are exported/imported. Restoring application data related to databases ([PostgreSQL](/documentation/services/databases/postgresql.html#how-to-backup-or-restore-database-data), [MariaDB](/documentation/services/databases/mariadb.html#how-to-backup-or-restore-database-data), [KeyDB](/documentation/services/databases/keydb.html#how-to-backup-or-restore-database-data)), storage ([Object Storage](/documentation/services/storage/s3.html#using-rclone-as-a-local-management-tool), Shared Storage), and engines ([RabbitMQ](/documentation/services/message-brokers/rabbitmq.html#how-to-backup-restore-queues-data)), deploying applications, and setting up [public routing](/documentation/routing/using-your-domain.html) is up to the specific user.

[[TOC]]

Expand Down Expand Up @@ -109,7 +109,7 @@ Comprehensive table of available types:
|PostgreSQL |postgresql@12 |
|MariaDB |[email protected] |
|KeyDB |keydb@6 |
|Node.js |nodejs@16, nodejs@14, nodejs@12 |
|Node.js |nodejs@16, nodejs@14 |
|Golang |golang@1 |
|PHP+Apache |[email protected]+2.4, [email protected]+2.4, [email protected]+2.4 |
|PHP+Nginx |[email protected]+1.20, [email protected]+1.20, [email protected]+1.20 |
Expand Down
4 changes: 2 additions & 2 deletions src/documentation/services/databases/keydb.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
#### Which version to choose
You can currently only choose version **v6** (version 6.2.2 to be precise).
You can currently only choose version **v6** (version 6.2.2, to be precise).
Used as the export & import type: ==`keydb@6`== .

Expand Down Expand Up @@ -135,7 +135,7 @@ However, if KeyDB stops working without a correct shutdown for any reason, you s
:::
<!-- markdownlint-enable DOCSMD004 -->

## How to backup / restore database data
## How to backup or restore database data

### Using your favorite database management tool

Expand Down
8 changes: 4 additions & 4 deletions src/documentation/services/databases/mariadb.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ services:
#### Which version to choose
You can currently only choose MariaDB version **v10.4** (version 10.4.24 to be precise).
You can currently only choose MariaDB version **v10.4** (version 10.4.24, to be precise).
Used as the export & import type: ==`[email protected]`== .

<!-- markdownlint-disable DOCSMD004 -->
::: tip Changing version
Switching must be done manually by creating a new service with another version and migrating data using a [backup / restore](#how-to-backup-restore-database-data) pattern.
Switching must be done manually by creating a new service with another version and migrating data using a [backup / restore](#how-to-backup-or-restore-database-data) pattern.
:::
<!-- markdownlint-enable DOCSMD004 -->

Expand Down Expand Up @@ -154,7 +154,7 @@ A new database with the name based on the selected **hostname** is created durin
* Zerops will only automatically scale the database [vertically](/documentation/automatic-scaling/how-automatic-scaling-works.html#vertical-scaling) (both in non-HA and HA mode).
* The [horizontal autoscaling](/documentation/automatic-scaling/how-automatic-scaling-works.html#horizontal-scaling) in HA mode is not applied because of optimal performance.

## How to backup / restore database data
## How to backup or restore database data

### Using your favorite database management tool

Expand Down Expand Up @@ -265,7 +265,7 @@ You can also force synchronization to wait for causality checks on a cluster by

Each container has separate local disk space, which can theoretically be used by appropriate APIs of the database service and thus store data outside the replicated contents of the database. It should be noted that such data is only reserved for this particular instance, not mirrored across the MariaDB Galera cluster, nor is it backed up. It will not be migrated if such a container is deleted due to failure. Also, separate direct access to an individual MariaDB instance is not supported in any way.

We don't recommend using any functionality of [SELECT INTO OUTFILE](https://mariadb.com/kb/en/select-into-outfile), [SELECT INTO DUMPFILE](https://mariadb.com/kb/en/select-into-dumpfile), [LOAD_FILE](https://mariadb.com/kb/en/load_file), or [LOAD DATA](https://dev.mysql.com/doc/refman/8.0/en/load-data.html). You can't save/load such data directly to/from any shared storage, and in the Galera HA cluster environment, it is impossible to predict which container the selected data will be stored on. Instead, use the the [export/import](/documentation/services/databases/mariadb.html#how-to-backup-restore-database-data) mechanism's standard functionality.
We don't recommend using any functionality of [SELECT INTO OUTFILE](https://mariadb.com/kb/en/select-into-outfile), [SELECT INTO DUMPFILE](https://mariadb.com/kb/en/select-into-dumpfile), [LOAD_FILE](https://mariadb.com/kb/en/load_file), or [LOAD DATA](https://dev.mysql.com/doc/refman/8.0/en/load-data.html). You can't save/load such data directly to/from any shared storage, and in the Galera HA cluster environment, it is impossible to predict which container the selected data will be stored on. Instead, use the the [export/import](/documentation/services/databases/mariadb.html#how-to-backup-or-restore-database-data) mechanism's standard functionality.

### Selected specifics of a Galera HA cluster

Expand Down
6 changes: 3 additions & 3 deletions src/documentation/services/databases/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
#### Which version to choose
You can currently only choose PostgreSQL version **v12** (version 12.10 to be precise).
You can currently only choose PostgreSQL version **v12** (version 12.10, to be precise).
Used as the export & import type: ==`postgresql@12`== .

Expand Down Expand Up @@ -158,7 +158,7 @@ A new database with the name based on the selected **hostname** is created durin
* Each PostgreSQL container (1 in non-HA, 3 in HA) starts with 1 vCPU, 1 GB RAM, and 1 GB of disk space.
* Zerops will automatically scale the HW resources both [vertically](/documentation/automatic-scaling/how-automatic-scaling-works.html#vertical-scaling) (in non-HA and HA mode) and [horizontally](/documentation/automatic-scaling/how-automatic-scaling-works.html#horizontal-scaling) (in HA mode only).

## How to backup / restore database data
## How to backup or restore database data

### Using your favorite database management tool

Expand Down Expand Up @@ -289,7 +289,7 @@ A similar case would be with two immediately following SELECT statements to get

Each container has separate local disk space, which can theoretically be used by appropriate APIs of the database service and thus store data outside the replicated contents of the database. It should be noted that such data is reserved solely for this particular instance, and not mirrored across the PostgreSQL Patroni cluster nor backup-ed. It will not be migrated if such a container is deleted due to failure. Also, separate direct access to an individual PostgreSQL instance is not supported in any way.

We don't recommend using the functionality of [COPY](https://www.postgresql.org/docs/current/sql-copy.html) because you can't save/load such data directly to/from any shared storage. Instead, use the standard functionality of the [export/import](/documentation/services/databases/postgresql.html#how-to-backup-restore-database-data) mechanism.
We don't recommend using the functionality of [COPY](https://www.postgresql.org/docs/current/sql-copy.html) because you can't save/load such data directly to/from any shared storage. Instead, use the standard functionality of the [export/import](/documentation/services/databases/postgresql.html#how-to-backup-or-restore-database-data) mechanism.

### Selected specifics of a Patroni HA cluster

Expand Down
2 changes: 1 addition & 1 deletion src/documentation/services/message-brokers/rabbitmq.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
#### Which version to choose
You can currently only choose version **v3** (version 3.9.13 to be precise).
You can currently only choose version **v3** (version 3.9.13, to be precise).
Used as the export & import types: ==`rabbitmq@3`== .

Expand Down
6 changes: 1 addition & 5 deletions src/documentation/services/runtimes/golang.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,13 @@ services:
- port: 8080
# If a web server is running on the port.
httpSupport: true
# A command that should start your service.
# It will be triggered after each deployment or after you manually start or re-start it.
# The executable can be created using a command: go build -o ./bin/server ./app/server.go
startCommand: ./bin/server
```
### Through the Zerops GUI interface
#### Which version to choose
You can currently only choose Golang version **v1** (version v1.18.4 to be precise).
You can currently only choose Golang version **v1** (version v1.18.4, to be precise).
Used as the export & import type: ==`golang@1`== .

Expand Down
7 changes: 2 additions & 5 deletions src/documentation/services/runtimes/nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,15 @@ services:
- port: 3000
# If a web server is running on the port.
httpSupport: true
# A command that should start your service.
# It will be triggered after each deployment or after you manually start or re-start it.
startCommand: npm start
```
### Through the Zerops GUI interface
#### Which version to choose
You can currently choose Node.js version **v16** (version v16.14.0 to be precise), **v14** (version 14.19.0 to be precise), or **v12** (version 12.22.10 to be precise). The chosen version **can't be changed afterwards**.
You can currently choose Node.js version **v16** (version v16.14.0, to be precise), or **v14** (version 14.19.0, to be precise). The chosen version **can't be changed afterward**.
Used as the export & import types: ==`nodejs@16`== , ==`nodejs@14`== , or ==`nodejs@12`== .
Used as the export & import types: ==`nodejs@16`== , or ==`nodejs@14`== .

<!-- markdownlint-disable DOCSMD004 -->
::: tip Changing versions
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/services/runtimes/php.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ services:
#### Which version to choose
You can currently choose PHP version **v8.1** (version v8.1.3 to be precise), **v8.0** (version v8.0.16 to be precise), or **v7.4** (version v7.4.28 to be precise). The chosen version **can't be changed afterwards**. The service is always combined with a web server. It can be either **Apache v2.4** (version 2.4.29 to be precise) or **Nginx v1.20** (version 1.20.1 to be precise). The differences and configuration specifics for each web server are listed below.
You can currently choose PHP version **v8.1** (version v8.1.3, to be precise), **v8.0** (version v8.0.16, to be precise), or **v7.4** (version v7.4.28, to be precise). The chosen version **can't be changed afterward**. The service is always combined with a web server. It can be either **Apache v2.4** (version 2.4.29 to be precise) or **Nginx v1.20** (version 1.20.1 to be precise). The differences and configuration specifics for each web server are listed below.
Used as the export & import types: ==`[email protected]+2.4`== , ==`[email protected]+2.4`== , ==`[email protected]+2.4`== , ==`[email protected]+2.4`== , ==`[email protected]+2.4`== , ==`[email protected]+2.4`== .

Expand Down
2 changes: 1 addition & 1 deletion src/documentation/services/static-servers/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ services:
#### Which version to choose
You can currently only choose Nginx version **v1.20** (version 1.20.1 to be precise).
You can currently only choose Nginx version **v1.20** (version 1.20.1, to be precise).
Used as the export & import type: ==`[email protected]`== .

Expand Down

0 comments on commit 0a3b699

Please sign in to comment.