pypiserver

by Helm

Helm chartv3.1.1App 1.3.2

PyPI compatible server for pip or easy_install.

About this chart

PyPi Sever Helm Chart

This chart installs a PyPI server

Prerequisites Details

  • Kubernetes 1.6+
  • PV dynamic provisioning support on the underlying infrastructure

Todo

  • Document a setup using a ReadWriteMany storage that is resilient and scallable.
  • Maybe use part of pypicloud in order to use S3 or GCS backend storage.

Adding the repo

To add the repo to helm with the name owkin:

$ helm repo add owkin https://owkin.github.io/charts

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release owkin/pypiserver

Upgrading the Charts

Updating the chart is as straightforward as updating the helm release

$ helm upgrade my-release owkin/pypiserver

Configuration

The following tables lists the configurable parameters of the PyPI server chart and their default values.

ParameterDescriptionDefault
replicaCountDeployment replica count1
image.repositoryContainer image repositorypypiserver/pypiserver
image.tagContainer image namev1.3.2
image.pullPolicyContainer pull policyIfNotPresent
image.pullSecretsContainer pull secrets[]
pypiserver.extraArgsAdditional arguments (beside -P, -p, -a) to be passed to the underyling pypiserver image[]
auth.actionsActions requiring authentication (comma separated list)update
auth.credentialsMap of username / encoded password to write in a htpasswd file{}
auth.existingSecretName of externally provided secret with credentials""
ingress.enabledIngress configuration flagfalse
ingress.ingressClassNameIngress class namenil
ingress.labelsIngress labels{}
ingress.annotationsIngress annotations{}
ingress.pathIngress pathnil
ingress.pathTypeIngress path typeImplementationSpecific
ingress.hostsIngress hostsnil
ingress.tlsIngress TLS configuration[]
service.typeService typeClusterIP
service.portService port8080
service.annotationsService annotations{}
service.labelsService labels{}
service.clusterIPService cluster IP""
service.externalIPsService external IPs[]
service.loadBalancerIPService load balancer IP""
service.loadBalancerSourceRangesService load balancer CIDR ranges[]
service.nodePortService node portnil
persistence.enabledPersistence configuration flagfalse
persistence.storageClassPersistence storage classnil
persistence.existingClaimPersistent volume claim static namenil
persistence.accessModePersistence access modeReadWriteOnce
persistence.sizePersistence volume size5Gi
persistence.mountPropagationMount propagation methodnil
securityContext.enabledSecurity context configuration flagtrue
securityContext.runAsUserUser ID to run as0
securityContext.runAsGroupGroup ID to run as0
securityContext.fsGroupFilesystem volume owner1000
resourcesResources configuration bloc{}
nodeSelectorNode selector of the deployment{}
tolerationsTolerations configuration for the deployment[]
affinityAffinity of the deployment{}
podLabelsExtra labels applied to the pod{}
podAnnotationsExtra annotations applied to the pod{}

Specify each parameter using the --set key=value[,key=value] argument to helm install.

Deploy pypiserver with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has pypiserver on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartpypiserver is pinned at v3.1.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply