Skip to content

Commit 0ff5dbe

Browse files
committed
Kubernetes: first iteration of Helm chart documentation
1 parent e5356ca commit 0ff5dbe

File tree

2 files changed

+106
-1
lines changed

2 files changed

+106
-1
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Installing the Private Packagist Self-Hosted Helm chart in an existing Kubernetes cluster
2+
##
3+
4+
The Private Packagist Self-Hosted Helm chart allows you to install Private Packagist in an existing Kubernetes cluster,
5+
to instead install Private Packagist Self-Hosted without an existing Kubernetes cluster follow [this guide](./kubernetes-embedded.md).
6+
7+
## General requirements
8+
9+
1. A Kubernetes cluster v1.23 or v1.24
10+
1. Your username and password to log in to the registry. Don't have one yet? [Sign up for a free trial license!](https://packagist.com/self-hosted)
11+
1. One (sub-)domain to operate the web interface, e.g. packagist.myintranet.com
12+
1. One (sub-)domain to operate the composer repository, e.g. repo.packagist.myintranet.com or packagist-repo.myintranet.com
13+
1. An SSL certificate valid for both chosen domains
14+
1. An SMTP server or a GMail account for Private Packagist Self-Hosted to send email
15+
1. If your firewall restricts external connections the following domains must be accessible from the server:
16+
* hub.docker.com
17+
* proxy.replicated.com
18+
* registry.replicated.com
19+
* replicated.app
20+
* amazonaws.com
21+
* k8s.gcr.io
22+
23+
## Installation
24+
25+
Private Packagist Self-Hosted requires PostgreSQL, Redis, and blob storage to store application data and Composer packages.
26+
You can either use the build-in options to come with the Helm chart or use your own PostgreSQL, Redis, and blob storage.
27+
For blob storage, we currently support Azure Blob Storage, Google Cloud Storage, AWS S3, and other S3-compatible storage solutions.
28+
29+
Please note that if you chose to use the built-int solution then each of the storage requires one or more volumes using
30+
[dynamic volume provision](https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/) to allocate storage for the different Pods.
31+
Configure the Storage Class in global values section.
32+
33+
### Annotated configuration
34+
35+
HELM_CHART_VALUES_FILE
36+
37+
#### Login to the Helm registry and install the chart
38+
39+
To install the Private Packagist Self-Hosted Helm Chart configure values based on your setup and then run the commands below.
40+
Make sure you replace `YOUR_USERNAME`, `YOUR_PASSWORD`, `YOURVALUES.yaml`, and `VERSION` with your values before running the commands.
41+
42+
```
43+
helm registry login registry.replicated.com --username YOUR_USERNAME --password YOUR_PASSWORD
44+
helm install -f YOURVALUES.yaml private-packagist oci://registry.replicated.com/privatepackagistkots/unstable/private-packagist --version VERSION
45+
```
46+
47+
#### Authentication Setup
48+
Within Private Packagist Self-Hosted, you now need to set up at least one user authentication method.
49+
You have the choice between authentication with email addresses and passwords and several OAuth integrations with third-party services.
50+
We provide integrations with on-premises versions of GitHub, Bitbucket, GitLab, or their public services on github.com, bitbucket.org,
51+
or gitlab.com. Follow the instructions to create the respective required identifiers, tokens, and secrets.
52+
53+
* [GitHub (Enterprise) Integration Setup](./github-integration-setup.md)
54+
* [Bitbucket.org Integration Setup](./bitbucket-integration-setup.md)
55+
* [Bitbucket Data Center / Server Integration Setup](./bitbucket-server-integration-setup.md)
56+
* [GitLab Integration Setup](./gitlab-integration-setup.md)
57+
* [Authentication with Email Addresses and Passwords](./authentication-email-addresses-passwords-setup.md).
58+
59+
60+
![Add Integration](/Resources/public/img/docs/self-hosted/08-integration.png)
61+
62+
#### Selecting Admins
63+
After setting up an integration, you can log in through the top menu. Register an account and pick a username.
64+
65+
![Register Admin](/Resources/public/img/docs/self-hosted/09-register-admin.png)
66+
67+
The first user is granted admin permissions automatically. You can grant admin permissions to more users in the admin panel.
68+
69+
![Add Admin](/Resources/public/img/docs/self-hosted/10-add-admin.png)
70+
71+
#### Switching to Production Mode
72+
Head back to the admin console to disable the Setup Mode in the configuration. Once the preflight checks passed, you can
73+
apply the changes.
74+
75+
That’s it! Private Packagist Self-Hosted is now ready to be used! You’ll find all further information in the web interface.
76+
77+
## Database and storage with dynamic volumes
78+
79+
Private Packagist Self-Hosted will set up PostgreSQL, Redis, and MinIO to store application data and Composer packages.
80+
Each of them requires one or more volumes using [dynamic volume provision](https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/) to allocate storage for the different Pods.
81+
Configure the Storage Class under the Kubernetes Settings on the Config page in the admin console.
82+
83+
Alternatively, you can configure Private Packagist Self-Hosted to use your own PostgreSQL, Redis, and blob storage.
84+
For blob storage, we currently support Azure Blob Storage, Google Cloud Storage, AWS S3, and other S3-compatible storage solutions.
85+
86+
## Security
87+
88+
The Private Packagist Self-Hosted application expects that TLS termination happens at or before the Ingress level.
89+
All traffic within the cluster is unencrypted.
90+
91+
Make sure your Kubernetes network plugin encrypts connections between pods to avoid potential security issues.
92+
93+
## Backups
94+
95+
The Replicated admin console integrates with [Velero](https://velero.io/), a tool to back up and restore your Kubernetes
96+
cluster resources and persistent volumes. Private Packagist Self-Hosted provides annotations to help back up and restore
97+
the application with Velero.
98+
99+
If you are using your own backup solution, we recommend making regular backups of PostgreSQL, Redis, and the used blob
100+
storage.

docs/self-hosted/kubernetes.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@ such as backups or updates.
1313
Private Packagist Self-Hosted Kubernetes can either be installed in an existing cluster or using an installer that creates
1414
an embedded Kubernetes cluster on a linux machine.
1515

16+
#### Installing the Private Packagist Self-Hosted Kubernetes Helm chart in an existing cluster
17+
18+
If you already have an existing Kubernetes cluster running, and are comfortable installing Helm charts then follow [this guide](./kubernetes-helm.md).
19+
1620
#### Installing Private Packagist Self-Hosted Kubernetes in an existing cluster
1721

18-
If you already have an existing Kubernetes cluster running, follow [this guide](./kubernetes-existing.md).
22+
If you already have an existing Kubernetes cluster running, and would like to manage the application with a full fledged
23+
admin interface then follow [this guide](./kubernetes-existing.md).
1924

2025
#### Installing Private Packagist Self-Hosted Kubernetes in a Kubernetes cluster installed with kURL
2126

0 commit comments

Comments
 (0)