Skip to content

Commit

Permalink
[blog] Add a blog of building a control plane on local by docker-comp…
Browse files Browse the repository at this point in the history
…ose (#4823)

* Add blog: control-plane-on-local

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* Clearer explanation

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* Add ref to the example

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* Add description

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* Fix link to the demo repo

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* rename file to refer to docker-compose

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix date

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
  • Loading branch information
t-kikuc committed Mar 14, 2024
1 parent 85fbb16 commit 930487a
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
87 changes: 87 additions & 0 deletions docs/content/en/blog/control-plane-local-docker-compose.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
date: 2024-03-14
title: "Control Plane on local by docker-compose"
linkTitle: "Control Plane on local by docker-compose"
weight: 989
description: "This blog shows you how to install a PipeCD Control Plane on local machine easily."
author: Tetsuya Kikuchi ([@t-kikuc](https://github.com/t-kikuc))
---

Currently, you can deploy and operate a PipeCD Control Plane on a Kubernetes cluster or [on Amazon ECS](./control-plane-on-ecs.md).
However, some developers would like to build a Control Plane more easily for introduction or development.
This blog shows you how to install a PipeCD Control Plane on local machine easily.

This blog is for those who would like to:
- begin using PipeCD and experiment its features instantly, including Control Plane and Piped

### Architecture

The general architecture of PipeCD Control Plane is as below.
![](/images/control-plane-components.png)

> Note: See [Architecture Overview](docs/user-guide/managing-controlplane/architecture-overview/) doc for details.
In this blog, you will build a Control Plane by these containers:

- Server: pipecd server
- Ops: pipecd ops
- Cache: Redis
- Data Store: MySQL
- File Store: MinIO

### Installation of Control Plane

1. Get the demo codes from https://github.com/pipe-cd/demo/blob/main/control_plane/docker-compose/

2. Execute the below command for docker-compose.yaml you got in [1.].

```sh
docker-compose up
```

After executing the above command, you will see logs like below if success.

```log
pipecd-server-1 | successfully loaded control-plane configuration
pipecd-server-1 | successfully connected to file store
pipecd-server-1 | successfully connected to data store
pipecd-server-1 | grpc server will be run without tls
pipecd-server-1 | grpc server will be run without tls
pipecd-server-1 | grpc server is running on [::]:9080
pipecd-server-1 | grpc server is running on [::]:9083
pipecd-server-1 | grpc server will be run without tls
pipecd-server-1 | admin server is running on 9085
pipecd-server-1 | grpc server is running on [::]:9081
pipecd-server-1 | start running http server on :9082
```

### To confirm: Access the console of the Control Plane

1. Access http://localhost:8080 on your web browser.

2. Enter a value as below and `CONTINUE`.
- `Project Name`: `control-plane-local`

3. Enter values as below and `LOGIN`.
- `Username`: `hello-pipecd`
- `Password`: `hello-pipecd`

4. You will see the applications page. Success!

![](/images/control-plane-local-console.png)

### Clean up

To clean up the Control Plane, execute the below command.

```sh
docker-compose down
```

> Note: By following commands instead of above one, you can keep data such as Piped or applications on the Control Plane even after restarting/updating the server component.
```sh
# Restart only the server component.
docker-compose rm -fsv pipecd-server
docker-compose up pipecd-server
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 930487a

Please sign in to comment.