Skip to main content

Try the demo

The demo stack runs the real Delegaris container against a simulated AWS, with two accounts of sample machines, ready-made access rules and three sign-ins. It does not touch real AWS and needs no AWS account or directory. It is the quickest way to see what Delegaris does for an administrator, a developer and an approver.

You need Docker with the Compose plugin. The Delegaris image is built for x86_64 (amd64); on an Apple Silicon Mac or another arm64 machine, Docker runs it under emulation, which works but is slower to start. The demo is in the demo folder of the release repository.

Start it​

git clone https://github.com/Goodhall-Solutions/delegaris.git
cd delegaris/demo
docker compose up

(Without git, download docker-compose.yml and seed.py from that folder into a new folder and run docker compose up there.)

This pulls the Delegaris image, starts a simulated AWS (moto) beside it, and runs a one-off seed container that fills the simulated accounts and sets Delegaris up. The seed prints Seeded 2 accounts, 5 access rules and 6 friendly names. and Set up 2 server groups and Remote Desktop. when it is done.

Open http://localhost:8080.

If port 8080 is already taken on your machine, choose another first:

APP_PORT=18080 docker compose up

In PowerShell, set it with $env:APP_PORT="18080" before the command.

The three sign-ins​

The sign-in page lists them too.

Sign-inWho it isWhat they can do
admin / adminThe administratorEverything, including Accounts, access rules, Approvals, Activity, Reports and Settings.
dev / devA developer in the group AWS-Web-Team, with no AWS access of their ownStart, stop and keep on the web team's development machines, connect to the Windows tools machine with Remote Desktop, and use the Development stack group. In production the same actions go for approval first. No tags, no settings.
lead / leadAn ops lead in the group AWS-Ops-LeadsApprove or decline what dev asks for in production (under Approvals), and start, stop and keep on anything that has a schedule.

admin is the local administrator. dev and lead are demo accounts from the DEMO_USERS setting: password accounts with made-up group memberships, so the service can be tried as an ordinary user without a directory. Never set DEMO_USERS on a real deployment.

A good first run: sign in as dev, stop a production web server and see the request go for approval; then sign in as lead in a private window and approve it under Approvals.

What the demo sets up​

Two accounts​

AccountIDManages
Production111111111111EC2, RDS, Auto Scaling groups, ECS services, Redshift
Development222222222222EC2, RDS, EKS node groups, SageMaker notebooks

Both are reached by assuming DelegarisRole in the account, all in eu-west-2.

Sample resources​

AccountResources
ProductionEC2 instances web-1, web-2, us-support-api, reporting-batch (stopped) and bastion (tagged Delegaris = protected, so only administrators can touch it); the Auto Scaling group api-asg; the ECS service checkout in the cluster apps; the Redshift cluster warehouse; the RDS database orders-db; the Aurora cluster analytics
DevelopmentEC2 instances dev-web, dev-api, win-tools, qa-runner (stopped) and data-sandbox (stopped); RDS databases dev-orders-db and qa-mysql (stopped); the EKS node group dev-workers in the cluster dev-k8s; the SageMaker notebook data-notebook

Resources carry Team, Environment and Schedule tags, so rules and friendly names have something to work on.

Access rules​

RuleWhoCanOn
Web team, their development machinesAWS-Web-TeamStart, stop, keep on, Remote DesktopDevelopment account, Team = web
Web team, production, with an ops lead's approvalAWS-Web-TeamStart, stop, keep on, only with approval from AWS-Ops-LeadsProduction account, Team = web
Ops leads, anything on a scheduleAWS-Ops-LeadsStart, stop, keep onAnything with a Schedule tag
QA, development account onlyAWS-QAStart, stop, keep onDevelopment account, Team = qa
Service desk can keep anything scheduled onService-DeskKeep onAnything with a Schedule tag

Nobody is given the right to edit tags: keeping a machine on past its schedule is its own right, and the service takes the schedule tag off and puts it back itself.

Friendly names, groups and Remote Desktop​

  • Friendly names: Schedule values 8-8 (UK office hours, Europe/London), us-8-8 (US office hours, America/New_York), 24x7 (always on) and 22-06 (overnight), with their hours; and Environment values prod and dev shown as Production and Development.
  • Server groups: Development stack (dev-orders-db, then dev-api and dev-web) and Reporting (the analytics cluster, then reporting-batch).
  • Remote Desktop: win-tools is set up to connect to its private IP through the gateway rdg.corp.example, signed in as the person's own CORP account.
  • A stand-in AWS Instance Scheduler configuration table in the Production account, so Settings > Friendly names > Read from the scheduler has something to read. Its 8-8 schedule also runs on Saturday mornings, so the import has a difference to show.

The demo looks for work that has fallen due every 10 seconds rather than 30, so keep-ons end promptly while you watch.

Things that behave differently in the demo​

  • The Accounts page warns that the service talks to a simulated AWS (AWS_ENDPOINT_URL). Real access keys pasted into the demo are answered by the simulation, which calls itself account 123456789012. To try real AWS, run the release image with the standard docker-compose.yml instead; see Docker Compose.
  • The simulated AWS keeps its state in memory, so it forgets the sample machines whenever it stops. The next time the demo starts, the seed notices and puts them back (as new machines, with new IDs), and points the server groups and Remote Desktop at them again. Keep-ons, bookings and history from before refer to the old machines.

Trying Slack with the demo​

The demo can send real Slack reminders. Create the Slack app as described in Slack, then start the demo with the tokens and the email addresses Slack knows you by:

SLACK_BOT_TOKEN=xoxb-… SLACK_APP_TOKEN=xapp-… ADMIN_EMAIL=you@example.com DEV_EMAIL=you@example.com \
docker compose up

LEAD_EMAIL and SLACK_FALLBACK_CHANNEL work the same way. Then, as dev, keep a machine on until a few minutes from now. The reminder arrives 15 minutes before the time, so set a time 16 or 17 minutes ahead, or lower Reminder, in minutes before under Settings > Schedules. Send me a test message under Settings > Notifications, Slack reminders, checks the connection on its own.

Two copies sharing PostgreSQL​

docker-compose.cluster.yml, in the same folder, runs two copies of Delegaris and a PostgreSQL database against the same simulated AWS, the way two servers behind a load balancer would:

docker compose -f docker-compose.cluster.yml -p delegaris-cluster up -d

Stop the single demo first (see below): both use port 8080. Copy one is on http://localhost:8080 and copy two on http://localhost:8081 (APP_PORT and APP_PORT_2 change them). A session signed in on one works on the other.

To watch a handover, find the active copy first: whichever started first holds the lease, so open /healthz on both and look for "role": "active". If it is copy one, stop it:

docker compose -f docker-compose.cluster.yml -p delegaris-cluster stop delegaris-1

(or delegaris-2 if copy two is the active one).

Within a minute, http://localhost:8081/healthz reports "role": "active". The cluster demo uses a 30-second lease so the handover is quick to see. See High availability.

Stop it and remove everything, the database included, with:

docker compose -f docker-compose.cluster.yml -p delegaris-cluster down -v

Stopping and starting over​

To stop the demo and remove everything it made, run this in the demo folder (from another terminal if the demo is running in the foreground):

docker compose down -v

The next docker compose up then starts from a fresh seed. Without -v, Docker leaves the demo's data volume behind unused, and the next start is fresh anyway.

Pressing Ctrl+C in the terminal running the demo only stops it. Starting it again with docker compose up keeps what you did in Delegaris; the seed puts the sample machines back into the simulated AWS, which forgets them when it stops.