Skip to content

Commit

Permalink
reset developer docs bc it got wiped (#1549)
Browse files Browse the repository at this point in the history
* reset developer docs bc it got wiped

* rm unnessecary items around static users
  • Loading branch information
johrstrom authored Nov 3, 2021
1 parent 12c0eef commit 759b038
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 4 deletions.
68 changes: 65 additions & 3 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -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
`<your username>@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.
```text
rake dev:rebuild
```
1 change: 0 additions & 1 deletion lib/tasks/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 759b038

Please sign in to comment.