|
| 1 | +--- |
| 2 | +title: "Quickstart" |
| 3 | +linkTitle: "Quickstart" |
| 4 | +weight: 3 |
| 5 | +description: > |
| 6 | + This page describes how to quickly get started with PipeCD on Kubernetes. |
| 7 | +--- |
| 8 | + |
| 9 | +PipeCD consists of two core components: The Control Plane and Piped (see [PipeCD Concepts](../concepts/)). |
| 10 | + |
| 11 | +- **The Control Plane** can be thought of as a web service application that can be installed anywhere. It provides the web UI, API endpoints, and metadata storage. |
| 12 | + |
| 13 | +- **Piped** is a lightweight agent that connects your infrastructure to the Control Plane. In PipeCD v1, Piped drops built-in platform support and uses a plugin-based model. Each plugin (an external component) implements the deployment and synchronization logic for a specific application kind, such as Kubernetes or Terraform. |
| 14 | + |
| 15 | +In this quickstart, you’ll install both components on a Kubernetes cluster and deploy a sample “hello world” application. |
| 16 | + |
| 17 | +>Note: |
| 18 | +> |
| 19 | +>- It's not required to install the PipeCD control plane to the cluster where your applications are running (See [PipeCD best practices](/blog/2021/12/29/pipecd-best-practice-01-operate-your-own-pipecd-cluster/) to understand more about PipeCD in real life use cases). |
| 20 | +>- If you want to experiment with PipeCD freely or don't have a Kubernetes cluster, we recommend using [this Tutorial](https://github.com/pipe-cd/tutorial). |
| 21 | +
|
| 22 | +--- |
| 23 | + |
| 24 | +### Prerequisites |
| 25 | + |
| 26 | +- A running Kubernetes cluster. |
| 27 | +- [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/) installed and configured to connect to your cluster. |
| 28 | + |
| 29 | +--- |
| 30 | + |
| 31 | +### 1. Installation |
| 32 | + |
| 33 | +#### 1.1. Installing PipeCD Control Plane |
| 34 | + |
| 35 | +```bash |
| 36 | +kubectl create namespace pipecd |
| 37 | +kubectl apply -n pipecd -f https://raw.githubusercontent.com/pipe-cd/pipecd/master/quickstart/manifests/control-plane.yaml |
| 38 | +``` |
| 39 | + |
| 40 | +The PipeCD control plane will be installed with a default project named `quickstart`. To access the PipeCD Control Plane UI, run the following command |
| 41 | + |
| 42 | +```bash |
| 43 | +kubectl port-forward -n pipecd svc/pipecd 8080 |
| 44 | +``` |
| 45 | + |
| 46 | +You can access the PipeCD console at [http://localhost:8080?project=quickstart](http://localhost:8080?project=quickstart) |
| 47 | + |
| 48 | +To login, you can use the configured static admin account as below: |
| 49 | + |
| 50 | +- username: `hello-pipecd` |
| 51 | +- password: `hello-pipecd` |
| 52 | + |
| 53 | +And you will access the main page of PipeCD Control Plane console, which looks like this |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +For more about PipeCD control plane management, please check [Managing ControlPlane](/docs/user-guide/managing-controlplane/). |
| 58 | + |
| 59 | +#### 1.2. Installing Piped |
| 60 | + |
| 61 | +Next, in order to perform CD tasks, you need to install a Piped agent to the cluster. |
| 62 | + |
| 63 | +From your logged in tab, navigate to the PipeCD setting page at [http://localhost:8080/settings/piped?project=quickstart](http://localhost:8080/settings/piped?project=quickstart). |
| 64 | + |
| 65 | +You will find the `+ADD` button around the top left of this page, click there and insert information to register the Piped agent (for example, `dev`). |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | +Click on the `Save` button, and then you can see the piped-id and secret-key. |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +You need to copy two values, `Piped Id` and `Base64 Encoded Piped Key`, and fill in `<COPIED_PIPED_ID>` and `<COPIED_ENCODED_PIPED_KEY>` respectively this command: |
| 74 | + |
| 75 | +```bash |
| 76 | +$ curl -s https://raw.githubusercontent.com/pipe-cd/pipecd/refs/heads/master/quickstart/manifests/pipedv1-exp.yaml | \ |
| 77 | + sed -e 's/<YOUR_PIPED_ID>/<COPIED_PIPED_ID>/g' \ |
| 78 | + -e 's/<YOUR_PIPED_KEY_DATA>/<COPIED_ENCODED_PIPED_KEY>/g' | \ |
| 79 | + kubectl apply -n pipecd -f - |
| 80 | +``` |
| 81 | + |
| 82 | +For more information about Piped management, please check [Managing Piped](/docs/user-guide/managing-piped/). |
| 83 | + |
| 84 | +That's all! You are ready to use PipeCD to manage your application's deployment. |
| 85 | + |
| 86 | +You can check the readiness of all PipeCD components via command |
| 87 | + |
| 88 | +```bash |
| 89 | +$ kubectl get pod -n pipecd |
| 90 | +NAME READY STATUS RESTARTS AGE |
| 91 | +pipecd-cache-56c7c65ddc-xqcst 1/1 Running 0 38m |
| 92 | +pipecd-gateway-58589b55f9-9nbrv 1/1 Running 0 38m |
| 93 | +pipecd-minio-677999d5bb-xnb78 1/1 Running 0 38m |
| 94 | +pipecd-mysql-6fff49fbc7-hkvt4 1/1 Running 0 38m |
| 95 | +pipecd-ops-779d6844db-nvbwn 1/1 Running 0 38m |
| 96 | +pipecd-server-5769df7fcb-9hc45 1/1 Running 1 (38m ago) 38m |
| 97 | +piped-8477b5d55d-74s5v 1/1 Running 0 97s |
| 98 | +``` |
| 99 | + |
| 100 | +--- |
| 101 | + |
| 102 | +### 2. Deploy a Kubernetes application with PipeCD |
| 103 | + |
| 104 | +Above is all that is necessary to set up your own PipeCD (both control plane and agent), let's use the installed one to deploy your first Kubernetes application with PipeCD. |
| 105 | + |
| 106 | +Navigate to the `Applications` page, click on the `+ADD` button on the top left corner. |
| 107 | + |
| 108 | +Go to the `ADD FROM SUGGESTIONS` tab, then select: |
| 109 | + |
| 110 | +- Piped that you have just registered (e.g. `dev`) |
| 111 | +- PlatformProvider: `kubernetes-default` |
| 112 | + |
| 113 | +You should see a lot of suggested applications. Select one of listed applications and click the `SAVE` button to register. |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | +After a bit, the first deployment is complete and will automatically sync the application to the state specified in the current Git commit. |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | +For more about manage applications' deployment with PipeCD, referrence to [Managing application](/docs/user-guide/managing-application/) |
| 122 | + |
| 123 | +--- |
| 124 | + |
| 125 | +### 3. Cleanup |
| 126 | + |
| 127 | +When you’re finished experimenting with PipeCD quickstart mode, you can uninstall it using: |
| 128 | + |
| 129 | +``` bash |
| 130 | +kubectl delete ns pipecd |
| 131 | +``` |
| 132 | + |
| 133 | +--- |
| 134 | + |
| 135 | +### What next? |
| 136 | + |
| 137 | +To prepare your PipeCD for a production environment, please visit the [Installation](../installation/) guideline. For guidelines to use PipeCD to deploy your application in daily usage, please visit the [User guide](../user-guide/) docs. |
| 138 | + |
| 139 | +To set up the development environment and start contributing to PipeCD, please visit the [Contributor guide](../contribution-guidelines/) docs. |
0 commit comments