Public | Automated Build

Last pushed: 6 months ago
Short Description
Canmet's htap development environment
Full Description

HTAP Development Environment

This image, is based upon the NRCan BTAP docker container. It contains a consistent development environment that runs the latests versions the HTAP ESP-r framework. This also allows NRCan staff to write helper scripts in a shared consistent linux environment and could be used on Amazon and Azure cloud resources.

Requirements

  • Windows 7+ 64 bit with a modern >=i5 computer with >=8GB RAM recommended
  • Enabling virutalization in your BIO (Instructions here) If you have an HP Z system like a lot of NRCan people do Enable Virtualization Technology (VTx) option when you boot your system. Hit F10 when you start your computer. In setup under Security > System Security Menu enable all VTx options. Note:Every Computer BIOS is different. It may be under advaced. Please refer to your bios manual for specific details.. Turn all virtual switch on to be consistant if there are more than one.
  • Admin rights
  • Install Docker Toolbox for Windows
  • Install Xming v6 X11 server

Creating a Workspace in 5 Steps

Step 0 Clone Repository

  1. Launch the Docker Quickstart Terminal (as seen in install instructions)
  2. Make a projects folder in your C:\Users\username folder then go into it.
    mkdir /c/Users/$(whoami)/projects && cd /c/Users/$(whoami)/projects
    
  3. Clone this rep and then enter that folder.
    git clone https://github.com/canmet-energy/htap && cd htap
    

Step 1 Ensure your Environment is Clean

This will erase ALL of your previous containers and download a freash new copy of the BTAP-DE. Careful this will erase all your previous images and containers and start fresh. It will not delete anything in your regular windows folders.

cd /c/Users/$(whoami)/projects/htap && ./1_rm_images_and_containers.sh

Step 2 Create The Docker HTAP-DE Image

This will create the Docker Image used for development. This may take a long time to build. At BCC this may take up to 4 hours, so you may wish to use the alternative for CanmetEnergy Staff. Be patient as this will take a long time.

cd /c/Users/$(whoami)/projects/htap && ./2-dockerfile_build_image.sh

Step 2 Alternative: Fast Method for CANMET Staff

BCC has very slow internet speed. To speed up very long download times, a version of the phylroy/htap-development-environment will be kept on the network drive. The above is the preferred method, but this is faster, but may not be always up to date. This should take 10-15 minutes.

cd /c/Users/$(whoami)/projects/htap && ./2-dockerfile_canmet_fast_build_image.sh

Step 3 Create a workspace container

This will create a container that you can do development in. You can create many containers based on the image that we created above. We will call this container my_workspace

cd /c/Users/$(whoami)/projects/htap && ./3-dockerfile_create_container.sh my_workspace

Step 4 Start Your Container

You can now just start your container by your container name, in this case it is my_workspace

cd /c/Users/$(whoami)/projects/htap && ./4-dockerfile_start_container.sh my_workspace

Basic Usage

After you start the container, you should see a new terminal with a red bar over that top. This is your X terminal called 'terminator this where you can execute linux commands. There are numerous tutorials on the linux console that we will not go into here.

Windows Interop

The container was set up to be linked to your C:\User\<your windows username> folder on windows. If you perform a directory listing "ls -l" and hit enter you should see a listing of files and folders. One of these folders is called 'windows-host' this is your shared folder to windows. If you ls that directory, you should see your host windows user folders. The neat thing is that you can interact with that folder like it was a mounted drive.


#Troubleshooting
## You see curl failures when building image indicating certifate failures.
This can be due to network conflicts. This has been observed on Docker for Windows v1.12.3.  One solution found was to change the mtu value to something lower in the docker host container.  You can add this by opening the Docker setting from the tray icon, going to the Docker Deamon tab and add the MTU value like below
```json
{
  "registry-mirrors": [],
  "insecure-registries": [],
  "debug": false,
  "mtu": 1400
}

I only have ~20GB of space in my docker machine..I need more!

The best way to deal with this is to delete the default docker machine and create a new one with the correct size. This procudure will delete all your images and containers..so back up anything that you need! This will create a 100GB disk. This procudure works only for Docker Toolbox and in the QuickStart Terminal.

docker-machine rm default
docker-machine create --driver virtualbox --virtualbox-disk-size "100000" default
docker-machine env default
Docker Pull Command
Owner
canmet
Source Repository

Comments (0)