YCPRadioTelescope / RT-Contracts

Back-end architecture for the Radio Telescope Senior Software Design Project for the 2018-2019 academic year
3 stars 1 forks source link

Application RUNS* from a docker file #73

Closed lgartrell closed 4 years ago

lgartrell commented 4 years ago

Requirements

Brief Overview

This task relates to the first part of our deployment strategy, which is containerizing our application. For this to work, essentially all the work that needs to be done is to set up the back-end environment in a dockerfile, very similar to what we have already been working on (which was just getting set up on our workspaces).

With new learning, comes new understanding. After understanding our deployment, we bundle the backend into a .jar file. So, the work is to figure out how to run the .jar in a container, rather than to build it.

Possible Plan

  1. Create dependency list regarding to the back-end environment
  2. Research docker images relating to the tools we use
    1. Docker base image for open jdk 8
    2. Docker base image for Gradle 4.7 (maybe not needed)
    3. etc. for each tool used
  3. Create dockerfile
  4. Test and refine dockerfile to reduce size of containers
  5. Repeat step 4 until size is acceptable

Further Learning

General docker documentation: https://docs.docker.com/ Dockerfile documentation: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/

TUllery commented 4 years ago

An epic change needs epic description. Describe in detail please. You can augment with links that describe the functionality.

lgartrell commented 4 years ago

Talked with Joel, learned that we deploy a single .jar file to AWS. No longer need to build to run all of our dependencies, should be just to build to run our .jar file. More learning needs to be done on what that entails, but I found an article here that looks like exactly what we need. Will be following it and sending a new comment with the result

lgartrell commented 4 years ago

Update

got the image I think is sufficient, but ran into my first roadblock which is managing two different "local hosts". My container is crashing because it cannot connect to the mysql instance on my computer, running on localhost. My actual localhost is different from my container's localhost, but I think I found a work around which is changing the IP table and mapping docker to something, but I need more digging into it.

This would not be a problem when we are actually deployed, but for local testing it is! More updates coming