Commit aacf4f7a authored by Annette Greiner's avatar Annette Greiner

reverting change from Project to Community in Spin docs

parent bbb5792f
......@@ -49,11 +49,11 @@ Started Guide overview](index.md). This will help you learn the requirements for
running in Spin, and will direct you to Docker's own Getting Started Guide to
become familiar with Docker.
### Get account on Spin, and a Community directory for Lesson 2
### Get account on Spin, and a Project directory for Lesson 2
The next lesson, [Spin Getting Started Guide: Lesson 2: Running Your Image in
Spin](lesson-2.md), requires an account on Spin, SSH access to a NERSC Login Node, and access
to a Community directory. For more information on those Prerequisites, see Lesson 2.
to a Project directory. For more information on those Prerequisites, see Lesson 2.
If you are waiting for your NERSC account to be set up, note that Lesson 1 can
be completed on your laptop without a NERSC account.
......
......@@ -19,7 +19,7 @@ You will also need:
a hands on Spin workshop. For more information, see [Spin Getting Started
Guide: How do I get started?](index.md)
* SSH access on a NERSC Login node, such as cori.nersc.gov.
* Access to a Community directory on the NERSC Global Filesystem, and the ability
* Access to a Project directory on the NERSC Global Filesystem, and the ability
to run `chmod o+x` on that directory to allow the user 'nobody' to read files
in that directory. This requirement is explained in detail below in [Part 3:
Prepare your application to run in Spin](#part-3-prepare-your-application-to-run-in-spin).
......@@ -321,7 +321,7 @@ into the Rancher environment.
## Part 3: Prepare your application to run in Spin
In this part, we'll prepare your application to run in Spin by copying
required files to your Community directory on the NERSC Global
required files to your Project directory on the NERSC Global
Filesystem, and modifying your Docker Compose file to work with Spin.
Files stored on the NERSC Global Filesystem must be made available to
......@@ -349,15 +349,15 @@ following:
* We are looking into ways to improve this experience, and are waiting
for improvements in the Linux Kernel and in Docker itself.
### Step 1: Make your Community directory available to Spin
### Step 1: Make your Project directory available to Spin
We will be creating some subdirectories within your Community directory
We will be creating some subdirectories within your Project directory
which will store your Docker Compose file, as well as files used by
your application.
The application subdirectories will be mounted inside the container by
way of a Docker **bind mount**. This means that you must set the
permissions of your Community directory to be available to Spin as
permissions of your Project directory to be available to Spin as
follows:
* **All directories and subdirectories used by your Spin application
......@@ -382,10 +382,10 @@ follows:
* All other permissions on these directories are up to you and your
team.
Head back your session on Cori, and create the Spin Community directory
Head back to your session on Cori, and create the Spin Project directory
with a command similar to this:
SPIN_DIRECTORY=/global/cfs/cdirs/YOUR_COLLAB_DIRECTORY/YOURUSERNAME-first-stack
SPIN_DIRECTORY=/global/project/projectdirs/YOUR_COLLAB_DIRECTORY/YOURUSERNAME-first-stack
mkdir $SPIN_DIRECTORY
mkdir $SPIN_DIRECTORY/web
chmod o+x $SPIN_DIRECTORY $SPIN_DIRECTORY/web
......@@ -404,7 +404,7 @@ and my default group is **superscience**. Notice how the directories
bit set for **other**, while *nginx-proxy.conf* is only readable by me
and my group.
elvis@nersc:~ $ cd /global/cfs/cdirs/superscience/spin/elvis-first-stack
elvis@nersc:~ $ cd /global/project/projectdirs/superscience/spin/elvis-first-stack
elvis@nersc:elvis-first-stack $ find . -ls
507571599 1 drwx-----x 3 elvis superscience 512 Mar 14 17:49 .
507571617 1 drwx-----x 2 elvis superscience 512 Mar 14 17:52 ./web
......@@ -426,8 +426,8 @@ and my group.
The Docker Compose file used on your laptop will need to be modified to work
with Spin.
In your Community directory (e.g.
`/global/cfs/cdirs/YOUR_COLLAB_DIRECTORY/YOURUSERNAME-first-stack`,
In your Project directory (e.g.
`/global/project/projectdirs/YOUR_COLLAB_DIRECTORY/YOURUSERNAME-first-stack`,
create a new Docker Compose file. **The name of the directory is
important**, because by default, the stack will be named after the
directory name. In these exercises we make sure that the directory
......@@ -437,7 +437,7 @@ using the `--stack` flag.
!!! info "Where should the Docker Compose file live?"
Technically, the Docker Compose file can live elsewhere on
the filesystem, such as in your home directory under
`~/docker/`. The Community directory is just a convenient place to
`~/docker/`. The Project directory is just a convenient place to
store this file. Some people would prefer to keep the
configuration of an application separate from the application
directory itself. Others prefer to keep the Configuration in one directory,
......@@ -470,7 +470,7 @@ services:
ports:
- "60000:8080"
volumes:
- /global/cfs/cdirs/YOUR_COLLAB_DIRECTORY/YOURUSERNAME-first-stack/web/nginx-proxy.conf:/etc/nginx/conf.d/default.conf:ro
- /global/project/projectdirs/YOUR_COLLAB_DIRECTORY/YOURUSERNAME-first-stack/web/nginx-proxy.conf:/etc/nginx/conf.d/default.conf:ro
user: YOUR_NERSC_UID:YOUR_NERSC_GID
group_add:
- nginx
......@@ -483,7 +483,7 @@ major differences:
* These services use your custom images which you built and pushed to the
Registry.
* The Nginx configuration file lives in your Community directory. The ':ro'
* The Nginx configuration file lives in your Project directory. The ':ro'
parameter, specified at the very end of the line, will make the file Read
Only. All files & directories in Spin should be Read Only whenever possible.
* Ports
......@@ -545,7 +545,7 @@ will print out the contents of the file, like so:
ports:
- "60000:8080"
volumes:
- /global/cfs/cdirs/isguser/spin/elvis-first-stack/web/nginx-proxy.conf:/etc/nginx/conf.d/default.conf:ro
- /global/project/projectdirs/isguser/spin/elvis-first-stack/web/nginx-proxy.conf:/etc/nginx/conf.d/default.conf:ro
user: 46311:75137
group_add:
- nginx
......@@ -569,9 +569,9 @@ While you're at it, quickly verify that the path to the Nginx file
matches the path specified in the Compose file. List the file, grep
the path from docker-compose.yml , and make sure they match:
ls /global/cfs/cdirs/YOUR_COLLAB_DIRECTORY/elvis-first-stack/web/nginx-proxy.conf/web/nginx-proxy.conf
ls /global/project/projectdirs/YOUR_COLLAB_DIRECTORY/elvis-first-stack/web/nginx-proxy.conf/web/nginx-proxy.conf
grep /global/cfs/cdirs/YOUR_COLLAB_DIRECTORY/elvis-first-stack/web/nginx-proxy.conf docker-compose.yml
grep /global/project/projectdirs/YOUR_COLLAB_DIRECTORY/elvis-first-stack/web/nginx-proxy.conf docker-compose.yml
!!! Tip "Tip: Simplify your workflow with `RANCHER_ENVIRONMENT`"
......
......@@ -31,7 +31,7 @@ to remain persistent.
Services which depend on persistent data must store their data on
persistent storage, or on an external Docker volume. In Lesson 2, we
showed how to store persistent data by mounting a Community directory as
showed how to store persistent data by mounting a Project directory as
a volume into your containers. The NERSC Global File System may not be
ideal for all workloads, so we also provide the Rancher NFS filesystem
which is a high performance filesystem dedicated to Spin and isn't
......@@ -80,12 +80,12 @@ simply use this stack as a reference for your own application.
rancher up --file docker-compose.yml.exampleX
### Create the Community Directory
### Create the Project Directory
First, create a Community directory to store the files, and clone the
First, create a Project directory to store the files, and clone the
Git repository into the working directory:
WORKDIR=/global/cfs/cdirs/YOUR_PROJECT/YOUR_SPIN_WORKDIR
WORKDIR=/global/project/projectdirs/YOUR_PROJECT/YOUR_SPIN_WORKDIR
mkdir $WORKDIR
cd $WORKDIR
git clone https://github.com/stefanlasiewski/spin-flask-demo.git .
......@@ -104,7 +104,7 @@ explained in Lesson 2, this is required so that the Spin daemons can
access files inside your subdirectories. The permissions on your
directory should show the `o+x` bit set, like so:
elvis@nersc:~ $ cd /global/cfs/cdirs/superscience/spin/elvis-flask-demo/
elvis@nersc:~ $ cd /global/project/projectdirs/superscience/spin/elvis-flask-demo/
elvis@nersc:elvis-flask-demo $ ls -ld . web/ web/images
drwxrwx--x 5 elvis elvis 131072 May 14 11:28 .
drwxrwx--x 3 elvis elvis 512 May 11 16:03 web/
......@@ -446,7 +446,7 @@ You will see output like the following.
back. We'll cover that in the next step.
elvis@nersc:elvis-flask-demo $ rancher up -d --upgrade --file docker-compose.yml.example2
INFO[0000] Creating secret db.elvis-flask-demo.mongo-initdb-password with contents from file /cfs/cdirs/superscience/spin/elvis-flask-demo/mongo-initdb-password
INFO[0000] Creating secret db.elvis-flask-demo.mongo-initdb-password with contents from file /project/projectdirs/superscience/spin/elvis-flask-demo/mongo-initdb-password
INFO[0000] [app]: Creating
INFO[0000] [db]: Creating
INFO[0000] [web]: Creating
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment