-
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.
Merge pull request #495 from kool-dev/docs
Cloud Documentation
- Loading branch information
Showing
70 changed files
with
711 additions
and
259 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
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
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
The [Kool.dev 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. | ||
**Kool.dev 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 | ||
|
||
1. [Sign up for Kool.dev Cloud](https://kool.dev/register) and get your access token. | ||
- You can store your token in your `.env` file if you are using one: | ||
- `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`](/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](/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. | ||
|
||
--- | ||
|
||
Reference: | ||
|
||
- [`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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
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 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 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. | ||
|
||
|
||
### `kool cloud deploy` building images | ||
|
||
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 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. | ||
|
||
```yaml | ||
services: | ||
app: | ||
# ... | ||
build: . # this uses the root folder as context, and expects a Dockerfile to exist on it | ||
``` | ||
or | ||
```yaml | ||
services: | ||
app: | ||
# ... | ||
build: | ||
context: ./dir # changes the context folder | ||
dockerfile: Dockerfile-alternate # name a different file than default 'Dockerfile' | ||
args: | ||
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 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: | ||
|
||
```yaml | ||
services: | ||
app: | ||
# ... | ||
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 [contact us via email at `[email protected]`]([email protected]) to set it up for you. | ||
|
Oops, something went wrong.