Subject: [codesprints] setting up docker environment for IETF98 Codesprint

From: Alia Atlas <[email-masked]>
Date: Wed, 22 Mar 2017 13:02:07 -0400

I'm trying to get my environment set up beforehand.
Has anyone done so successfully on a Windows 7 box?
I've got cygwin installed and docker and run the docker/setupdb -
but I'm trying to run docker/updatedb and it is running into issues
with "dv".

Happy to get clue off-list.

Thanks,
Alia

On Mon, Mar 13, 2017 at 3:28 PM, Robert Sparks <[email-masked]> wrote:

> If you are planning to join us at the codesprint in Chicago, and have not
> signed up here:
>
> <https://trac.tools.ietf.org/tools/ietfdb/wiki/IETF98SprintSignUp>
>
> please do so today!
>
> RjS
>
> _______________________________________________
> codesprints mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/codesprints
>

---

From: Henrik Levkowetz <[email-masked]>
Date: Wed, 22 Mar 2017 18:46:53 +0100

Hi Alia,

> Happy to get clue off-list.

This may apply also to other code-sprinters, so I'll reply on-list:

Are you running docker/updatedb inside the docker environment?

I.e., you should first be able to successfully run docker/run,
and get a bash shell prompt, something like 'alia@f3207746ed43 $ ',
and then inside the new shell, you should run docker/updatedb.

If cygwin is still early on your path when you are in the docker
shell, it's likely to cause problems, though -- you actually do not
need to have cygwin installed at all (the enviroment contained in
the datatracker-environment docker image should provide all the unix
tools you need), so if you have cygwin installed, make sure it's not
on your path when you're running inside docker.

Best regards,

Henrik

---

From: Alia Atlas <[email-masked]>
Date: Wed, 22 Mar 2017 15:08:23 -0400

Hi Henrik & Robert,

Thanks for reaching out to help.  My issue was that that setupdb had an odd
failure (permission problem on mysql directory) that appears to have been
transient.
Therefore, I was trying to run updatedb not in the docker instance, which
was obviously
foolish.

I am now trying to do "docker/run" and hit the error:
  error: This script does not have support for your architecture
(MINGW64_NT-6.1); sorry :-(

I did check out the general 6.48.1.dev0 branch, because (not having yet
signed up for the codesprint),
I don't have a current personal branch.

Thanks,
Alia

---

From: Vinayak Hegde <[email-masked]>
Date: Thu, 23 Mar 2017 01:05:40 +0530

Hi Alia,

Not specific to this project, but I have found that there are always
compatibility and support issues when using cygwin for any slightly
complex project (such as Python/Django project here).

I have had better success using virtualbox on windows and then
installing a linux distro like ubuntu more useful in such scenarios.
Thought that this might help if you have this option.

Regards
Vinayak

---

From: Alia Atlas <[email-masked]>
Date: Wed, 22 Mar 2017 15:40:18 -0400

Hi Vinayak,

Right - that's what the docker image is supposed to do.
I'm crawling through docker/run now - trying to figure out where it
is getting wedged (beyond the obvious error happening from a check).

Regards,
Alia

---

From: Henrik Levkowetz <[email-masked]>
Date: Wed, 22 Mar 2017 21:19:20 +0100

Hi Alia,

> (MINGW64_NT-6.1); sorry :-(

Ahh.  Right.  Yes, of course -- silly of me -- in order to launch and
enter into docker using docker/run you'll need to have a functioning
bash which the script recognizes.

So in other words, we need a docker/run.bat, or something similar, to
make things easy, until we can build out docker/run to work with
cygwin under windows for the startup process.

Instead, let's see if we can just get the right things done and start
the docker image manually.  I'm using docker's documentation here, so
I've not tested these steps myself:

 1. Find the Docker Toolbox app, and click it to start.
 2. You should now have a terminal window with a bash shell.
 3. In that terminal, navigate to your datatracker checkout (working
    directory).  There should be a directory 'ietf' below that directory.
 4. In that terminal, run 'docker pull ietf/datatracker-environment:latest'
 5. In that terminal, run 'docker run -ti -p 8000:8000 -e USER=alia -e DATADIR=$PWD/../data -e CWD=$PWD -e TAG=latest -e FILEDIR=$PWD/../data ietf/datatracker-environment:latest'

Since I've typed the points above on the fly without testing, it's not
very likely you'll get to the end and have the docker environment up
on the first try, but I hope it can get you further.

> I don't have a current personal branch.

Ok.  If you would be so kind as to sign up for the codesprint, I'll run
the script which will create a branch for you.

Best regards,

	Henrik

---

From: Alia Atlas <[email-masked]>
Date: Wed, 22 Mar 2017 16:44:19 -0400

Hi Henrik,

> cygwin under windows for the startup process.

I can play with it under the cygwin shell and see how that goes.  I've been
just using the "Docker Quickstart Terminal" which does a "docker start".

I did make progress to get the docker/run script to run by changing to:

#    else
# die "This script does not have support for your architecture ($(uname));
sorry :-("
    fi
    if [ -n "$(type -p docker-machine)" ]; then
basemachine=$(type -p docker-machine)
        machine=$( printf %q "$basemachine")

This still has issues as far as errors before the testing (because the path
for $machine
has spaces in it) and after I exit the machine (because "docker images -f
dangling=true -q" returns nothing).

I'm up to step 9 of https://trac.tools.ietf.org/tools/ietfdb/wiki/Docker -
running the tests which seems
to be going just fine.

>  5. In that terminal, run 'docker run -ti -p 8000:8000 -e USER=alia -e
> DATADIR=$PWD/../data -e CWD=$PWD -e TAG=latest -e FILEDIR=$PWD/../data
> ietf/datatracker-environment:latest'
>

Of course - I have done so. I didn't want to waste anyone's time if I
couldn't at least get the
environment up before the CodeSprint.

Thank you for all your work on this.  Getting set up with the docker image
does seem to be
much more straightforward.

Regards,
Alia

---

From: Henrik Levkowetz <[email-masked]>
Date: Wed, 22 Mar 2017 22:49:17 +0100

> running the tests which seems

Oh, cool :-))

Best regards,

	Henrik