Introduction

  1. Deploying the Build System itself should be seamless should S3DF shut down, or if we decide to move to our own servers.
  2. What are the components of the Build System that has to be deployed for it to work?
  3. How can we have cluster ad-build-dev be our development server, and easily push changes to production cluster ad-build?
  4. How can we build the Build System through the Build System itself?

What to deploy

  1. core-build-system backend
    1. Repo: eed-web-application/core-build-system (github.com)
    2. Deployment repo: eed-web-application/core-build-system-deployment (github.com)
  2. ad-build image registry
    1. Repo: TODO
  3. artifact storage API
    1. Repo: BuildSystem/artifact_storage/api at main · ad-build-test/BuildSystem (github.com)
  4. build environment images
    1. Repo: BuildSystem/build_envs at main · ad-build-test/BuildSystem (github.com)
    2. These include the base images, which contain the base os, and the standard build scripts found in BuildSystem/build_scripts at main · ad-build-test/BuildSystem (github.com)
  5. CLI for Build System
    1. Repo: BuildSystem/bs_cli at main · ad-build-test/BuildSystem (github.com)
    2. Although this probably isn't 'deployed' like the rest of the components on this list

How to deploy

  1. core-build-system backend
    1. Download this repo: eed-web-application/core-build-system-deployment (github.com)
    2. Ensure vault-secrets-operator is running
    3. Ensure the proper secrets are in the vault, you can enter them here:  https://vault.slac.stanford.edu/ui/vault/secrets/secret/list/ad/ad-build-dev/
    4. Once your logged in to the appropriate kubernetes cluster,
      1. Follow these commands:

        cd core-build-system-deployment/
        kubectl apply -k test/
      2. Ex: output

        pnispero@PC100942:~/core-build-system-deployment$ kubectl apply -k test/
        serviceaccount/core-build-system-sa created
        serviceaccount/percona-server-mongodb-operator created
        role.rbac.authorization.k8s.io/percona-server-mongodb-operator created
        rolebinding.rbac.authorization.k8s.io/core-build-system-rb created
        rolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator created
        configmap/env-config-map created
        service/core-build-system-service created
        persistentvolumeclaim/core-build-system-s3df-ad-group created
        deployment.apps/core-build-system created
        deployment.apps/percona-server-mongodb-operator created
        Warning: path /api/cbs(/|$)(.*) cannot be used with pathType Prefix
        ingress.networking.k8s.io/core-build-system-ingress created
        ingress.networking.k8s.io/core-build-system-webhook-ingress created
        ingress.networking.k8s.io/elog-plus-backend-public-doc-ingress created
        perconaservermongodb.psmdb.percona.com/cbs-cluster created
        vaultsecret.ricoberger.de/application-secrets created
        vaultsecret.ricoberger.de/github-secret created
        vaultsecret.ricoberger.de/mongodb-secret created
    5. Once deployed, you should see the following pods running:
      1. core-build-system-<hash>
      2. cbs-cluster-rs0-0
      3. cbs-cluster-rs0-1
      4. cbs-cluster-rs0-2
    6. Apply crd for mongodb percona server (one time)
      1. https://github.com/eed-web-application/eed-accel-webapp-clusters-wide-setup.git

        pnispero@PC100942:~/eed-accel-webapp-clusters-wide-setup/test/mongodb-operator$ kubectl apply --server-side -f resource-1.15.0.yaml
        customresourcedefinition.apiextensions.k8s.io/perconaservermongodbbackups.psmdb.percona.com serverside-applied
        customresourcedefinition.apiextensions.k8s.io/perconaservermongodbrestores.psmdb.percona.com serverside-applied
        customresourcedefinition.apiextensions.k8s.io/perconaservermongodbs.psmdb.percona.com serverside-applied
        pnispero@PC100942:~/eed-accel-webapp-clusters-wide-setup/test/mongodb-operator$
  2. ad-build image registry
    1. TODO:
  3. artifact storage API
    1. Download this repo: https://github.com/ad-build-test/BuildSystem.git
    2. Once logged in to the appropriate kubernetes cluster,
      1. Follow these commands:

        cd BuildSystem/artifact_storage/
        kubectl apply -k artifact-deployment/
    3. Once deployed, you should see the following pods running:
      1. artfact-api-service-<hash>
  4. build environment images
    1. The dockerfiles just sit on BuildSystem/build_envs at main · ad-build-test/BuildSystem (github.com). And the registry I push to is dockerhub/pnispero, but eventually we will push images to ad-build registry.
    2. The images will sit in the S3DF filepath: /sdf/group/ad/eed/ad-build/registry/
    3. Since the images just sit there, we can pull them anytime, no 'deployment' is necessary to get these up and running.
    4. However, we may want to distinguish between dev and prod
      1. We can tag images for dev as <image-name>:dev. Ex: rocky9-env:dev
      2. We can tag images for prod as <image-name>:latest Ex: rocky9-env:latest
  5. CLI for Build System
    1. R
  • No labels