-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6813e5a
commit 0b8951d
Showing
9 changed files
with
56 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
The [Kool Cloud](https://kool.dev/cloud) supports a wide range of features designed to suit your needs for deploying containerized web applications. It supports features such as **persisting folders** across deployments, running **daemons** as extra containers, scheduling commands like **cron jobs**, adding **hooks to run before or after** deployment, **viewing logs** of running container, accessing the running container **interactively**, and much more. | ||
The [Kool Cloud](https://kool.dev/cloud) supports a wide range of features designed to suit your needs for deploying containerized web applications. It includes features such as **persisting folders** across deployments, running **daemons** as extra containers, scheduling commands like **cron jobs**, adding **hooks to run before or after** deployment, **viewing logs** of running containers, accessing the running container **interactively**, and much more. | ||
|
||
The Kool.dev Cloud API was designed with the best developer experience in mind for deploying containers to the cloud. By leveraging your existing local environment structure in `docker-compose.yml` and adding a sane and intuitive configuration layer that will feel familiar from the first sight, our goal is to provide a best-in-class offering for cloud platform engineering. This platform allows you to leverage Kubernetes and orchestrate your web applications in the cloud without all the hassle. | ||
|
||
> **Enterprise**: you can use Kool.dev Cloud to deploy workloads to your own cloud vendor to keep things compliant - [contact us](mailto:[email protected]) for the **"Bring your Own Cloud"** offer. | ||
> **Enterprise**: You can use Kool.dev Cloud to deploy workloads to your own cloud vendor to keep things compliant - [contact us](mailto:[email protected]) for the **"Bring your Own Cloud"** offer. | ||
**kool cloud** is the CLI suite of commands that allows you to configure, deploy, access, and tail logs from the applications to the cloud via the Kool.dev Cloud API. | ||
**Kool Cloud** is the CLI suite of commands that allows you to configure, deploy, access, and tail logs from the applications to the cloud via the Kool.dev Cloud API. | ||
|
||
## Deploy Docker Compose-based, containerized apps in just a few simple steps | ||
|
||
|
@@ -13,21 +13,21 @@ The Kool.dev Cloud API was designed with the best developer experience in mind f | |
- `echo "KOOL_API_TOKEN=<my-token>" >> .env` | ||
- Or you can store your token in a real environment variable: | ||
- `export KOOL_API_TOKEN="<my token>"` | ||
1. Configure your deployment with files directly in your application root folder. For that you can use [`kool cloud setup`](TODO:cloud-setup) to help guide you creating the following files: | ||
1. Configure your deployment with files directly in your application root folder. For that, you can use [`kool cloud setup`](/docs/commands-reference/kool-cloud-setup) to help guide you in creating the following files: | ||
- `kool.deploy.yml` - a "mirror" of your `docker-compose.yml` file, with extra pieces of data for customizing your cloud deployment. | ||
- `Dockerfile` - usually, you are going to need to build your app for deployment if you haven't already. | ||
- Make sure you set up the necessary [environment variables](TODO:envs) for your app to run in the cloud. | ||
- Make sure you set up the necessary [environment variables](/docs/kool-cloud/environment-variables) for your app to run in the cloud. | ||
1. Deploy your application | ||
- Run `kool cloud deploy --domain=<your domain>` - this will validate and deploy your application. | ||
- Wait for it to finish and then access the provided deployment URL! | ||
1. Doing more | ||
- **View logs** | ||
- `kool cloud logs` - you can check the logs of your deployed containers. | ||
- **Access running containers (like SSH-ing in)** | ||
- `kool cloud exec` - you can execute commands, including interactive TTY sessions, within your cloud-deployed containers. For example: `kool cloud exec app bash` to open a bash in my running container in the cloud. | ||
- `kool cloud exec` - you can execute commands, including interactive TTY sessions, within your cloud-deployed containers. For example, `kool cloud exec app bash` to open a bash in my running container in the cloud. | ||
|
||
--- | ||
|
||
Reference: | ||
|
||
- [`kool.deploy.yml` Reference](/docs/02-Kool-Cloud/20-kool.deploy.yml-Reference.md) | ||
- [`kool.deploy.yml` Reference](/docs/kool-cloud/kool.deploy.yml-reference) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
This topic is usually the biggest source or problems and trial and error frustrations when deploying cloud native applications for the first time. | ||
This topic is usually the biggest source of problems and trial-and-error frustrations when deploying cloud-native applications for the first time. | ||
|
||
As much as the Kool.dev project and the whole community tries to help and facilitate container images building, it is a times ultimately an individual and singular process for your web application. | ||
As much as the Kool.dev project and the whole community try to help and facilitate container image building, it is at times ultimately an individual and singular process for your web application. | ||
|
||
That being said there's no scape from having some knowledge on how to properly build your images to deploy your app to the cloud - or at least seek such knowledgable hands to assist your in this moment. | ||
That being said, there's no escape from having some knowledge of how to properly build your images to deploy your app to the cloud—or at least seek such knowledgeable hands to assist you in this moment. | ||
|
||
For the most basic cases — like if you are using one of our presets — you will have a great starting point by using our utility along with `kool cloud setup`. This command will inquire about basic options for building your container images. | ||
|
||
For the most basic cases - like if you are using one of our presets - you will have a great start point by using our utility along `kool cloud setup` - this command will inquiry you about basic options on building your container images. | ||
|
||
### `kool cloud deploy` building images | ||
|
||
`kool` CLI is going to handle the build of your images locally - in your own host system. That means it's required that the environment where you are going to run `kool cloud deploy` have a working Docker-like engine running that can process successfully a `docker build ...` command. | ||
The `kool` CLI is going to handle the build of your images locally—in your own host system. That means it's required that the environment where you are going to run `kool cloud deploy` has a working Docker-like engine running that can successfully process a `docker build ...` command. | ||
|
||
The syntax configuration for building your deploy image for a given service on `kool.cloud.yml` is the very same as you use it locally on `docker-compose.yml`: | ||
The syntax configuration for building your deploy image for a given service in `kool.cloud.yml` is the very same as you use it locally in `docker-compose.yml`: | ||
|
||
Check out the [Docker Compose `build` Documentation](https://docs.docker.com/compose/compose-file/compose-file-v3/#build) for reference. | ||
|
||
|
@@ -34,11 +35,11 @@ services: | |
buildno: 1 # define values for ARGS used in your Dockerfile | ||
``` | ||
Your image will be built locally when running the `kool` CLI for a deploy, and then pushed securely to Kool.dev Cloud registry to a repository dedicated to your app environment. | ||
Your image will be built locally when running the `kool` CLI for a deploy and then pushed securely to the Kool.dev Cloud registry to a repository dedicated to your app environment. | ||
|
||
### Using a Private Registry | ||
|
||
You may already have or use your own private registry for handling images. You are welcome to hold the build process apart from the `kool cloud deploy` step, and just use the already built images in your `kool.cloud.yml` file: | ||
You may already have or use your own private registry for handling images. You are welcome to hold the build process apart from the `kool cloud deploy` step and just use the already built images in your `kool.cloud.yml` file: | ||
|
||
```yaml | ||
services: | ||
|
@@ -47,4 +48,5 @@ services: | |
image: myrepo-registry/my-built-image | ||
``` | ||
|
||
If that registry is private you need to provide Kool.dev Cloud with credentials to read from that repo. As this is not yet fully automated you can [ping us via email to `[email protected]`]([email protected]) to set it up for you. | ||
If that registry is private, you need to provide Kool.dev Cloud with credentials to read from that repo. As this is not yet fully automated, you can [contact us via email at `[email protected]`]([email protected]) to set it up for you. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
Most of time the web applications you are going to deploy will usually have its own companying database. | ||
Most of the time, the web applications you are going to deploy will usually have their accompanying database. | ||
|
||
Kool.dev Cloud offers two ways for you do deploy your databases. | ||
Kool.dev Cloud offers two ways for you to deploy your databases: | ||
|
||
1. Deploy databases as regular containers. | ||
1. Use a managed database on a shared structure. | ||
1. Use a dedicated Database Custom Resource (i.e RDS dedicated instance). | ||
2. Use a managed database on a shared structure. | ||
3. Use a dedicated Database Custom Resource (i.e., RDS dedicated instance). | ||
|
||
All of this options come with basic daily backup routines for your safety. | ||
All of these options come with basic daily backup routines for your safety. | ||
|
||
### Deploy Databases as Regular Containers | ||
|
||
Deploying a container that is going to run your database is pretty straight forward - just like your have it in your local `docker-compose.yml` for your local environment, you can deploy that very same container. The benefit of this is you have full control at your container configuration and can use any type of database. | ||
Deploying a container that is going to run your database is pretty straightforward—just like you have it in your local `docker-compose.yml` for your local environment, you can deploy that very same container. The benefit of this is you have full control over your container configuration and can use any type of database. | ||
|
||
#### Caveats of deploying databases on containers are | ||
|
||
- **Persistent disk storage**: by default deployed containers are ephemeral and DO NOT have any disk persistent storage. This may cause problems if you deploy a database and upon restart, all your data is lost. **You must make sure to incoude in your container deploy configuration a `persistent` disk storage**, so upon restarts your data is kept safe and is no longer ephemeral. | ||
- **Environment variables**: your database image may require specific environment variables to determine credentials and other settings. You need to make sure you set them correctly, different than your local ones. | ||
- **Persistent disk storage**: by default, deployed containers are ephemeral and DO NOT have any disk persistent storage. This may cause problems if you deploy a database and upon restart, all your data is lost. **You must make sure to include in your container deploy configuration a `persistent` disk storage**, so upon restarts, your data is kept safe and is no longer ephemeral. | ||
- **Environment variables**: your database image may require specific environment variables to determine credentials and other settings. You need to make sure you set them correctly, different from your local ones. | ||
|
||
### Managed Database in shared structure | ||
### Managed Database in a Shared Structure | ||
|
||
This option is the easiest to get started - but currently only supports MySQL 8 database deployments. | ||
This option is the easiest to get started with but currently only supports MySQL 8 database deployments. | ||
|
||
If you have a MySQL database in your `docker-compose.yml`, you can just assign that service the `cloud: true` on your `kool.cloud.yml` and Kool.dev Cloud is going to setup a new database on a running shared RDS instance. | ||
If you have a MySQL database in your `docker-compose.yml`, you can just assign that service the `cloud: true` on your `kool.cloud.yml`, and Kool.dev Cloud is going to set up a new database on a running shared RDS instance. | ||
|
||
This managed options will provide you with variables placeholders for you to get a hold of the credentials automatically generated as well as the database name/host. | ||
This managed option will provide you with variable placeholders for you to get a hold of the credentials automatically generated as well as the database name/host. | ||
|
||
Here is the list of Kool.dev variables placeholders available and how you would use them in your environment variables definition to use the managed database: | ||
|
||
|
@@ -35,18 +35,18 @@ DB_USERNAME="{{KOOL_DATABASE_USERNAME}}" | |
DB_PASSWORD="{{KOOL_DATABASE_PASSWORD}}" | ||
``` | ||
|
||
The placeholders always have the `{{PLACEHOLDER}}` syntax. When used anywhere in your `kool.cloud.yml` configuration they are going to be replaced by their managed values when deploying. | ||
The placeholders always have the `{{PLACEHOLDER}}` syntax. When used anywhere in your `kool.cloud.yml` configuration, they are going to be replaced by their managed values when deploying. | ||
|
||
#### Caveats of using managed shared database | ||
|
||
- Currently **only supports MySQL 8** deployments. | ||
- Being a shared resource, top performance is not guarenteed (unless you have it running in your own Cloud vendor account in the Enterprise offer). | ||
- Currently, **only supports MySQL 8** deployments. | ||
- Being a shared resource, top performance is not guaranteed (unless you have it running in your own Cloud vendor account in the Enterprise offer). | ||
- Best suited for development and staging workloads. | ||
|
||
### Dedicated Database Resource | ||
|
||
You can have any sort of custom resource for your application, including dedicated databases (i.e RDS or ElastiCache). | ||
You can have any sort of custom resource for your application, including dedicated databases (i.e., RDS or ElastiCache). | ||
|
||
As this is not yet fully automated you need to [contact our support to set it up](mailto:[email protected]) for you in your account. | ||
As this is not yet fully automated, you need to [contact our support to set it up](mailto:[email protected]) for you in your account. | ||
|
||
One of the benefits is having total control of your set up not only on disk/computing performance, but as well as tailored backup and replication options. | ||
One of the benefits is having total control of your setup not only on disk/computing performance but as well as tailored backup and replication options. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.