From 759b0380d76a734af0ed9ed359df2387b844aaf4 Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Wed, 3 Nov 2021 10:01:14 -0400 Subject: [PATCH] reset developer docs bc it got wiped (#1549) * reset developer docs bc it got wiped * rm unnessecary items around static users --- DEVELOPMENT.md | 68 ++++++++++++++++++++++++++++++++++++++-- lib/tasks/development.rb | 1 - 2 files changed, 65 insertions(+), 4 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 6f4f0577cc..b06711a477 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -1,8 +1,70 @@ # Developing Open-OnDemand +These are instructions to build and interact with a full stack +development container. + +If you've completed this or already run Open OnDemand at your site you +can refer to [the dashboard's readme](apps/dashboard/README.md) for details +on how to develop the dashboard. + ## Getting Started -## Developing the dashboard +This container will create a duplicate user +with the same group and user id. Starting the container will prompt +you to set a password. This is only credentials for web access to the +container. + +Pull down this source code and start the container. + +```text +mkdir -p ~/ondemand +git clone https://github.com/OSC/ondemand.git ~/ondemand/src +cd ~/ondemand/src +rake dev:start +``` + +See `rake --tasks` for all the `dev:` related tasks. + +``` +rake dev:exec # Bash exec into the development container +rake dev:restart # Restart development container +rake dev:start # Start development container +rake dev:stop # Stop development container +``` + +### Login to the container + +Here's the important bit about user mapping with containers. Let's use the +example of `jessie` with `id` below. In creating the development container, +we added a user with the same. The password is for `dex` the IDP, and the +web only. + +``` +uid=1000(jessie) gid=1000(jessie) groups=1000(jessie) +``` + +Now you'll be able to access `http://localhost:8080/` where it'll redirect +you to `dex` the OpenID Connect provider within the container. Use the email +`@localhost`. + + +### Configuring the container + +In starting the container, you may see the mount +`~/.config/ondemand/container:/etc/ood`. This mount allows us to +completely configure this Open-OnDemand container. + +Create and edit files in the host's home directory and to mount in +new configurations. + +Remove `~/.config/ondemand/ood_portal.yml` to reset your +container's password. + +### Rebuilding the image + +All the development tasks will use the `ood-dev:latest` image. If +you want to rebuild to a newer version use the rebuild task. -Refer to [the dashboard's readme](apps/dashboard/README.md) for details -on how to develop the dashboard. \ No newline at end of file +```text +rake dev:rebuild +``` \ No newline at end of file diff --git a/lib/tasks/development.rb b/lib/tasks/development.rb index d149bed8c7..cbb100f833 100644 --- a/lib/tasks/development.rb +++ b/lib/tasks/development.rb @@ -84,7 +84,6 @@ def dev_mounts ctr_args = [container_runtime, 'run', '-p 8080:8080', '-p 5556:5556'] ctr_args.concat ["--name #{dev_container_name}"] ctr_args.concat ['--rm', '--detach'] - ctr_args.concat ['-e', 'OOD_STATIC_USER=/etc/ood/config/static_user.yml'] ctr_args.concat dev_mounts ctr_args.concat container_rt_args