Skip to content

Commit

Permalink
chatgpt review
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriciojs committed Jan 9, 2024
1 parent 6813e5a commit 0b8951d
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 54 deletions.
14 changes: 7 additions & 7 deletions docs/02-Kool-Cloud/01-Getting-Started.md
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

Expand All @@ -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)
20 changes: 11 additions & 9 deletions docs/02-Kool-Cloud/03-Building-Images-to-Deploy.md
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 locallyin 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.

Expand All @@ -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:
Expand All @@ -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.

12 changes: 6 additions & 6 deletions docs/02-Kool-Cloud/05-Environment-Variables.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Most application and frameworks nowadays will rely on environment variables to configure important aspects of its functions, mainly providing credentials and other secrets your app need to work and access other resources.
Most applications and frameworks nowadays rely on environment variables to configure important aspects of their functions, mainly providing credentials and other secrets your app needs to work and access other resources.

Kool.dev Cloud supports a few different ways you can define your environment variables for a given deploying container, so pick the one that best suits you.
Kool.dev Cloud supports a few different ways you can define your environment variables for a deploying container, so pick the one that best suits you.

### Using `kool.deploy.env` file for deploy

Expand All @@ -13,9 +13,9 @@ services:
environment: kool.deploy.env
```
Upong deployment, all of the variables within that file will be parsed, placeholders replaced - if you have any - and then **each variable will become a real environment variables in the running container**.
Upon deployment, all of the variables within that file will be parsed, placeholders replacedif you have anyand then **each variable will become a real environment variable in the running container**.
This option is usually best suited for automated CI routines since you work your way to have a different `kool.deploy.env` file for each of your deploying environments (i.e staging and production).
This option is usually best suited for automated CI routines since you work your way to have a different `kool.deploy.env` file for each of your deploying environments (i.e., staging and production).

### Using a plain YAML object for environment variables

Expand All @@ -31,7 +31,7 @@ You can simply use a YAML map of values that will become your environment variab

### Build a `.env` file inside the running container

If you application does rely and requires a `.env` file existing in the running container you may achieve so by using the `env:` entry:
If your application does rely on and requires a `.env` file existing in the running container, you may achieve so by using the `env:` entry:

```yaml
services:
Expand All @@ -44,4 +44,4 @@ services:
target: .env
```

This is useful for apps that have require the .env file, but you do not wish to have that built into your Docker image itself.
This is useful for apps that require the .env file, but you do not wish to have that built into your Docker image itself.
6 changes: 3 additions & 3 deletions docs/02-Kool-Cloud/07-Domains-and-HTTPS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
All deployed environments will run under HTTPS. Kool.dev Cloud will automatically generate certificates for your environment the first time it is deployed using Let'sEncrypt engine.
All deployed environments will run under HTTPS. Kool.dev Cloud will automatically generate certificates for your environment the first time it is deployed using the Let'sEncrypt engine.

You always need to provide the environment domain when running a deploy.

Expand All @@ -15,10 +15,10 @@ Important to notice: if you deploy to a new domain that doesn't currently exist

### Test deployment domains

You are welcome to use a subdomain like `my-super-app.kool.cloud` on your staging or development environments. By using that you will have HTTPS certificates up and running instantly for that environment after first deploy.
You are welcome to use a subdomain like `my-super-app.kool.cloud` on your staging or development environments. By using that, you will have HTTPS certificates up and running instantly for that environment after the first deploy.

### Production and custom domains

When you create an environment to be deployed using your own custom domain name, you will need to check out in the Kool.dev Cloud panel for that environment the instructions to where to point your A/CNAME for that domain.

HTTPS certificates will only be successfully generated once the DNS is correctly pointing your domain to Kool.dev Cloud.
HTTPS certificates will only be successfully generated once the DNS is correctly pointing your domain to Kool.dev Cloud.
36 changes: 18 additions & 18 deletions docs/02-Kool-Cloud/08-Managed-Databases.md
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:

Expand All @@ -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.
4 changes: 2 additions & 2 deletions docs/02-Kool-Cloud/10-Persistent-Storage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Containers were built to be ephemeral - and that is how we like them and how Kubernetes and all other container orchestrators usually work the best with them as well.
Containers were built to be ephemeraland that is how we like them and how Kubernetes and all other container orchestrators usually work the best with them as well.

But at times we know that tradicional web applications may not be ready to switch to network-based object storage instead of local disk storage.
But at times, we know that traditional web applications may not be ready to switch to network-based object storage instead of local disk storage.

Kool.dev Cloud does offer you the ability to create persisted paths within your deployed containers.

Expand Down
Loading

0 comments on commit 0b8951d

Please sign in to comment.