-
Notifications
You must be signed in to change notification settings - Fork 11
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
63f10e4
commit 3195d8e
Showing
5 changed files
with
135 additions
and
20 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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
title: Setting Up a Micro Service | ||
description: Deploying a Micro Service with Plural | ||
--- | ||
|
||
|
||
# Set Up | ||
This example will deploy the [Plural CD Demo](https://github.com/pluralsh/plrl-cd-demo) App | ||
|
||
#### Add the Application Repository | ||
* In your _Infra_ repo, add the `GitRepository` CRD | ||
* `/app/repositories/cd-demo.yaml` | ||
```yaml | ||
apiVersion: deployments.plural.sh/v1alpha1 | ||
kind: GitRepository | ||
metadata: | ||
name: cd-demo | ||
spec: | ||
url: https://github.com/pluralsh/plrl-cd-demo.git | ||
``` | ||
* The Plural repositories Service Deployment watches for changes in `/app/repositories` and will sync it to the management cluster | ||
* The status `Pullable` means the Repository is ready to be used. | ||
![import-git-status](/images/how-to/import-git-status.png) | ||
* Setup a Dev and Prod ServiceDeployment using the Added Repo | ||
```yaml | ||
apiVersion: deployments.plural.sh/v1alpha1 | ||
kind: ServiceDeployment | ||
metadata: | ||
name: cd-demo-dev | ||
namespace: infra | ||
spec: | ||
namespace: cd-demo | ||
git: | ||
folder: helm | ||
ref: main | ||
repositoryRef: | ||
kind: GitRepository | ||
name: cd-demo | ||
namespace: infra | ||
helm: | ||
version: "x.x.x" | ||
release: cd-demo-dev | ||
values: | ||
image: | ||
repository: ghcr.io/pluralsh/plrl-cd-test | ||
pullPolicy: IfNotPresent | ||
tag: "sha-783cc0c" | ||
ingress: | ||
enabled: true | ||
className: nginx | ||
annotations: | ||
cert-manager.io/cluster-issuer: letsencrypt-staging | ||
hosts: | ||
- host: cd-demo.plrl.livingroom.cloud | ||
paths: | ||
- path: / | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: cd-demo-dev | ||
port: | ||
number: 80 | ||
tls: | ||
- secretName: cd-demo-tls | ||
hosts: | ||
- cd-demo.plrl.livingroom.cloud | ||
clusterRef: | ||
kind: Cluster | ||
name: plrl-how-to-workload-00-dev | ||
namespace: infra | ||
``` | ||
* You should be able to see the service and all its components running | ||
![](/images/how-to/micro-service.png) |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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