Skip to content

Commit

Permalink
Merge branch 'master' of github.com:g2s3-2018/hippylib-hub
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Parno authored and Matthew Parno committed Jul 2, 2018
2 parents 03ae346 + f1fe3c2 commit 4d40280
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 16 deletions.
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>hippylib-hub</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
8 changes: 8 additions & 0 deletions .pydevproject
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/${PROJECT_DIR_NAME}</path>
</pydev_pathproperty>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
</pydev_project>
2 changes: 1 addition & 1 deletion Docker_cheatsheet
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Useful commands for manipulating docker containers and images:
docker run -i -t imauq/fenics /bin/bash

- To build docker image, run this in base folder:
I
docker build -t imauq/fenics .

- List all running docker containers:
docker ps
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ USER root
COPY jupyterhub_config.py /home/fenics/jupyterhub_config.py
COPY make-users-std-password.sh /etc/my_init.d/make-users-std-password.sh
RUN chmod +x /etc/my_init.d/make-users-std-password.sh
RUN rm /etc/my_init.d/set-home-permissions.sh
COPY update_lab.sh /home/fenics/update_lab.sh
RUN chmod +x /home/fenics/update_lab.sh
RUN mkdir -p /home/fenics/.jupyter
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Here a list of instructions:
2. Build the docker image (This step needs to be repeated each time `hippylib` or `muq` is updated)

```
sudo docker build -t hippylib/hub .
sudo docker build -t muq-hippylib/g2s3hub .
```

3. Check that the image was created correctly with the command
Expand All @@ -30,7 +30,7 @@ Here a list of instructions:
4. Start the server

```
sudo docker run -td -p 80:8000 --name=hippyhub hippylib/hub
sudo docker run -td -p 80:8000 --name=g2s3hub muq-hippylib/g2s3hub
```

5. Check that the server is up
Expand All @@ -42,17 +42,17 @@ Here a list of instructions:
6. Check messages from the server

```
sudo docker logs hippyhub
sudo docker logs g2s3hub
```

7. Update the Lab materials

```
docker exec --user root hippyhub ./update_lab.sh <LabName>
docker exec --user root g2s3hub ./update_lab.sh <LabName>
```

8. Stop ad delete the server (always stop the server before rebuilding the docker image)

```
sudo docker stop hippyhub & sudo docker rm hippyhub
sudo docker stop g2s3hub & sudo docker rm g2s3hub
```
7 changes: 1 addition & 6 deletions make-users-std-password.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ do
chown -R user${i} /home/user${i}/.jupyter
chmod -R u+rX /home/user${i}/.jupyter

#cp -r /home/fenics/Installations/labs/Labs /home/user${i}/
#chown -R user${i} /home/user${i}/Labs
#chmod -R u+rX /home/user${i}/Labs

mkdir /home/user${i}/Labs
echo "Each day of the school we will automatically add material to this folder for corresponding lab session." > /home/user${i}/Labs/README
cp -r /home/fenics/Installations/labs/Labs /home/user${i}/
chown -R user${i} /home/user${i}/Labs
chmod -R u+rX /home/user${i}/Labs

Expand Down
9 changes: 5 additions & 4 deletions selfdeploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh
git clone https://github.com/hippylib/hippylib-hub.git
git clone https://github.com/g2s3-2018/hippylib-hub.git
cd hippylib-hub
sudo docker pull mparno/muq-hippylib
sudo docker run -td -p 80:8000 --name=hippyhub mparno/muq-hippylib
sudo docker logs hippyhub > hippyhub.out
sudo docker build -t muq-hippylib/g2s3hub .
sudo docker run -td -p 80:8000 --name=g2s3hub muq-hippylib/g2s3hub
sleep 2m
sudo docker logs g2s3hub > g2s3hub.out

0 comments on commit 4d40280

Please sign in to comment.