Service: Vacay Planner - EyevinnOSC/community GitHub Wiki

Vacay Planner

Vacay Planner (serviceId birme-vacay-planner) is an open-source team vacation planning tool with a shared calendar for scheduling and managing time off. It is a long-running service instance. This page also covers its dependency, Apache CouchDB (apache-couchdb, Apache-2.0).

What it can do

  • Create, edit and track vacation requests.
  • Role-based access (Admin/User), with an admin panel for user management and approving or rejecting vacations.
  • Calendar integration through iCal feeds for personal and team calendars.
  • Live status updates and notifications.

Creating an instance

Vacay Planner stores its data in CouchDB. Create a CouchDB instance first (serviceId apache-couchdb) and confirm it is running.

  1. Create CouchDB with create-service-instance (serviceId: "apache-couchdb"), a name and an AdminPassword (see the options below).
  2. Read the address and port with describe-service-instance (an internal endpoint is also returned for use by other OSC services). Build the connection URL with the admin credentials, http://admin:<password>@<host>:<port>.
  3. Store the URL as a secret with create-service-secret (serviceId: "birme-vacay-planner"), for example dburl.
  4. Generate a key for signing authentication tokens, for example with openssl rand -hex 32, and store it as a secret named jwtsecret.
  5. Create Vacay Planner with create-service-instance using serviceId: "birme-vacay-planner". The instance name must be alphanumeric and at most 20 characters.
{
  "name": "myteamvacay",
  "DbUrl": "{{secrets.dburl}}",
  "JwtSecret": "{{secrets.jwtsecret}}"
}
  1. Wait with wait-for-service-ready and get the URL with describe-service-instance.

With the OSC CLI:

osc create birme-vacay-planner myteamvacay \
  -o DbUrl="{{secrets.dburl}}" \
  -o JwtSecret="{{secrets.jwtsecret}}"

Options

Option Required Type Meaning
name Yes string Name of the instance. Alphanumeric, at most 20 characters.
DbUrl Yes string, sensitive CouchDB connection URL including admin credentials, in the format http://admin:<password>@<host>:<port>. Store it as a secret and pass {{secrets.NAME}}.
JwtSecret Yes string, sensitive Secret key used to sign authentication tokens (JWT). Use a long random string, for example from openssl rand -hex 32. Store it as a secret and pass {{secrets.NAME}}.

A {{secrets.NAME}} reference must be the whole field value. Changing a secret later does not restart a running instance.

CouchDB options

Service apache-couchdb (long-running instance):

Option Required Type Meaning
name Yes string Name of the instance. Alphanumeric, at most 20 characters.
AdminPassword Yes string, sensitive Password for the CouchDB administrator account. The admin user name is admin. Store it as a secret and pass {{secrets.NAME}}.

Using the instance

Open the instance URL, create your admin account and start inviting team members. Users can subscribe to personal and team calendar feeds (iCal) in their calendar application.

Resources

⚠️ **GitHub.com Fallback** ⚠️