Skip to content
Snippets Groups Projects
README.md 2.75 KiB
Newer Older
Xueshan Feng's avatar
Xueshan Feng committed
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Stanford OpenLDAP in Container**
Xueshan Feng's avatar
Xueshan Feng committed

Xueshan Feng's avatar
Xueshan Feng committed
- [Stanford OpenLDAP in Container](#stanford-openldap-in-container)
- [Get and setup personal drone token](#get-and-setup-personal-drone-token)
- [Turn on the ci job defined in .drone.yml](#turn-on-the-ci-job-defined-in-droneyml)
- [Update ldap image](#update-ldap-image)
  - [Verify the configuration env defined in env.sh, make sure all the key files are accessible](#verify-the-configuration-env-defined-in-envsh-make-sure-all-the-key-files-are-accessible)
  - [Manual push to Google container registry](#manual-push-to-google-container-registry)
Xueshan Feng's avatar
Xueshan Feng committed

Xueshan Feng's avatar
Xueshan Feng committed
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
Xueshan Feng's avatar
Xueshan Feng committed

Xueshan Feng's avatar
Xueshan Feng committed
[![Build Status](https://drone.svc.stanford.edu/api/badges/authnz/docker-openldap/status.svg)](https://drone.svc.stanford.edu/authnz/docker-openldap)
Xueshan Feng's avatar
Xueshan Feng committed

Xueshan Feng's avatar
Xueshan Feng committed
# Stanford OpenLDAP in Container
Xueshan Feng's avatar
Xueshan Feng committed

Xueshan Feng's avatar
Xueshan Feng committed
This repository contains instructions how to build and publish docker-ldap image to
Google Container Registry.
Xueshan Feng's avatar
Xueshan Feng committed

Xueshan Feng's avatar
Xueshan Feng committed
This repo supports [DroneCI](https://drone.svc.stanford.edu/authnz/docker-openldap).
Xueshan Feng's avatar
Xueshan Feng committed

Xueshan Feng's avatar
Xueshan Feng committed
# Get and setup personal drone token
Xueshan Feng's avatar
Xueshan Feng committed

Drone CLI requires access token to talk to drone server.

Xueshan Feng's avatar
Xueshan Feng committed
Please get your [personal token](https://drone.svc.stanford.edu/account/token),
and save the the token to ${HOME}/.drone-token file.
Xueshan Feng's avatar
Xueshan Feng committed

_NOTE_: Do not add newline at the end of the token.

Xueshan Feng's avatar
Xueshan Feng committed
# Turn on the ci job defined in .drone.yml

NOTE: This will setup the hook for CI trigger. This only needs to be done once. You probably don't
need to run this if it's been setup already.
Xueshan Feng's avatar
Xueshan Feng committed

```
$ make drone-setup
```

Xueshan Feng's avatar
Xueshan Feng committed
See .drone.yml for build steps and triggers.

# Update openldap image

If you make changes to the repository, you can test build manually. If the build is successful,
then commit and push changes to the docker-ldap repository. It will trigger CI/CD to build and upload
gcr.io/uit-authnz/openldap:latest image.

## Manual push to Google container registry

```console
# make build
$ make push

Updating PS cloud framework from Git into /Users/sfeng/bin/ps-cloud-framework...
VAULT SERVER: https://vault.stanford.edu
You are logged in VAULT and have permission to read from secret/projects/uit-authnz/*
Login Succeeded
Push gcr.io/uit-authnz/ldap:048d8295ebbd129086db9161b12b101eb685959e ...
The push refers to repository [gcr.io/uit-authnz/ldap]
e53371689781: Pushed
a8eb0a957605: Pushed
188e99cd395e: Pushed
f819153fc68b: Pushed
d982fc324e3e: Pushed
4276ef46cf43: Pushed
96e57cd3c993: Layer already exists
240b0bdf7f50: Layer already exists
202b974c712a: Layer already exists
43a852aaa685: Layer already exists
latest: digest: sha256:e56efd42b560cffa77a588b0e9ecde71110ec74a6c101d7f53a838a587a460a1 size: 2402
```