Adding an OCP group to Operate First Cloud#

Instructions on how to add an OCP group to Operate First Cloud.

Add groups manually#

  1. Set your GitHub username, your choice of OCP group, and your workingdir:

OCP_GROUP=<enter-your-group-here>
GITHUB_USER=<your-github-user-handle>
WORKING_DIR=<path-to-your-working-dir>
  1. Fork/Clone apps repo https://github.com/operate-first/apps.git:

# After forking
$ git clone https://github.com/$GITHUB_USER/apps.git $WORKING_DIR
  1. Navigate to the base OCP groups directory:

$ cd $WORKING_DIR/apps/cluster-scope/base/user.openshift.io/groups/
  1. Create your $OCP_GROUP folder:

$ mkdir $OCP_GROUP
$ cd $OCP_GROUP
  1. Create group.yaml in $OCP_GROUP

$ cat <<EOF > group.yaml
apiVersion: user.openshift.io/v1
kind: Group
metadata:
    name: $OCP_GROUP
users: []
EOF

Add users to the users field accordingly.

  1. Create the kustomization.yaml

$ cat <<EOF > kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
    - group.yaml
EOF
  1. Add the following line to cluster-scope/overlays/prod/common/kustomization.yaml alphabetically:

- ../../../base/user.openshift.io/groups/$OCP_GROUP
  1. Commit and push your changes. Submit a PR to the upstream repository.

Use the OPF CLI#

  1. Clone/Fork/Navigate to working directory as shown above

  2. Follow instructions here: https://github.com/operate-first/opfcli#create-group

  3. Commit and push your changes. Submit a PR to the upstream repository.