airavata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Christie (Jira)" <j...@apache.org>
Subject [jira] [Commented] (AIRAVATA-3364) Gateways tutorial: make it possible for Windows Home users
Date Mon, 17 Aug 2020 14:17:00 GMT

    [ https://issues.apache.org/jira/browse/AIRAVATA-3364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17179011#comment-17179011
] 

Marcus Christie commented on AIRAVATA-3364:
-------------------------------------------

Running Docker on Jetstream. First, setting up the VM. I'm following https://docs.docker.com/engine/install/centos/#install-using-the-repository
and https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user

{code}
source TG-TRA160027-openrc.sh
openstack image list
source ENV/bin/activate
openstack flavor list
export IMAGE=JS-API-Featured-CentOS7-Latest
export PROJECT_NAME=${OS_USERNAME}-docker-tutorial
openstack server create ${OS_USERNAME}-docker-tutorial --flavor m1.tiny --image $IMAGE --key-name
${OS_USERNAME}-marcusc --security-group global-ssh --nic net-id=${OS_USERNAME}-api-net
openstack floating ip create public
openstack server add floating ip $PROJECT_NAME 149.165.157.105
{code}

ssh centos@149.165.157.105
{code}
sudo yum install -y yum-utils
sudo yum-config-manager     --add-repo     https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install -y docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker
# Test that it is running
sudo docker run hello-world
# Add my 'centos' user to docker group
sudo usermod -aG docker centos
{code}

Reboot the VM:
{code}
openstack server reboot $PROJECT_NAME
{code}

>From my local machine:
{code}
docker context create jetstream --docker host=ssh://centos@149.165.157.105
docker --context jetstream ps -a
docker context use jetstream
docker run hello-world
{code}

See https://docs.docker.com/engine/context/working-with-contexts/

Cannot bind mount local directory onto container in remote Docker daemon:
https://www.reddit.com/r/docker/comments/7bsqxp/dockercompose_remote_host_bind_mount/dpkk71m/

*Must start container on Docker host*

JS VM:

{code}
git clone https://github.com/machristie/gateways19-tutorial
cd gateways19-tutorial/
docker run -d --name gateways19-tutorial -p 8000:8000 -v $PWD:/extensions -v $PWD/settings_local.py:/code/django_airavata/settings_local.py
machristie/airavata-django-portal
{code}

*SSH Tunnel*

laptop:

{code}
ssh -L 8000:0.0.0.0:8000 centos@149.165.157.105
{code}

This allows me to go to http://localhost:8000 and see the Django portal running in the dev
environment container.

*Edit files in Visual Studio Code*

https://code.visualstudio.com/docs/remote/ssh

*Clean stuff up*

{code}
openstack server remove floating ip $PROJECT_NAME 149.165.157.105
openstack floating ip delete 149.165.157.105
openstack server delete $PROJECT_NAME
{code}



> Gateways tutorial: make it possible for Windows Home users
> ----------------------------------------------------------
>
>                 Key: AIRAVATA-3364
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-3364
>             Project: Airavata
>          Issue Type: Task
>          Components: Django Portal, Website/Documentation
>            Reporter: Marcus Christie
>            Assignee: Marcus Christie
>            Priority: Major
>
> The ["Gateways 2019" tutorial|https://apache-airavata-django-portal.readthedocs.io/en/latest/tutorial/gateways2019_tutorial/]
makes use of Docker containers to establish a development environment. This way ever tutorial
participant has an identical environment and the only prerequisite is that they install Docker,
which is relatively straightforward. However, users who have Windows Home can't install Docker
Desktop. Windows Home doesn't include support for the native Windows virtualization feature
called Hyper-V. (Docker does support running in WSL 2, see https://docs.docker.com/docker-for-windows/install-windows-home/,
but setting up WSL 2 seems rather involved.)
> In the two times we've given this tutorial it seems to have been overwhelming students
who have Windows Home as their OS.  To make it possible for Windows Home users, especially
students who may be learning some of these technologies for the first time, to participate
fully in the tutorial, I propose setting up a Docker engine on a Jetstream server that users
can log into and use to run their dev environment container.
> This issue is to document the steps required to implement the proposal and update the
tutorial correspondingly.
> h3. TODO
> - [x] Try running through tutorial using Docker on Jetstream
> - [x] https://docs.docker.com/engine/context/working-with-contexts/
> - [ ] (maybe) alternate instructions for running Docker on commercial cloud, like Azure
container instances
> - [x] Use Visual Studio Code locally to edit files on the VM
> - [ ] Windows Home VM, install Docker client, and run through tutorial using Docker on
Jetstream



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message