ucd-library / csus-sp-2018

This repository holds overall Information and project planning for the 2018 CSUS Senior Design Project
MIT License
0 stars 0 forks source link

2.0.1: File System within Docker #56

Closed DerekMaggio closed 6 years ago

DerekMaggio commented 6 years ago

We have the fin-example-repo up an running on local machines. What we cannot figure out is where we put our files within the network of the 8 created docker containers.

For instance, where is the source file for the login screen that is shown in the example?

DerekMaggio commented 6 years ago

@qjhart @jrmerz I am trying to modify the yml file from fin-example-repository for development. I noticed that fin-server has a dev file, and I understand how that works. I was going to use that file but I noticed that the file on fin-server is an older version than the one on the fin-example-repo

I having trouble creating a dev yml file for the fin-example-repo. Do you have a file that I can use as an example to create our own?

Thank you

jrmerz commented 6 years ago

Not sure I follow, a little clarification, You are saying

fin-server dev: https://github.com/UCDavisLibrary/fin-server/blob/master/docker/ucd-dams-local-dev/docker-compose.yml

is older than the example repo: https://github.com/UCDavisLibrary/fin-example-repository/blob/master/fin-example.yml

What do you mean by older? Just that it's running version 2 of the docker compose spec? There is a difference in services and the example uses images from docker hub while the fin-server dev version builds local images. Is that what you need help with?

Just FYI you should be able to start up fin-server dev and then use the example repo's import scripts to add data if you are interested in modifying the fin source.

DerekMaggio commented 6 years ago

Thanks Justin. I am getting closer. My server is failing because I am getting an error.

module.js:549 throw err; ^

Error: Cannot find module '/etc/fin/webapp-service-account.json' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object. (/app/node_modules/@ucd-lib/fin-node-utils/logger.js:28:21) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3)

The git repo does not have this json file. Is it needed in the compose script?

On Thu, Sep 6, 2018 at 9:56 AM, Justin Merz notifications@github.com wrote:

Not sure I follow, a little clarification, You are saying

fin-server dev: https://github.com/UCDavisLibrary/fin-server/blob/master/docker/ucd-dams- local-dev/docker-compose.yml

is older than the example repo: https://github.com/UCDavisLibrary/fin-example-repository/blob/master/fin- example.yml

What do you mean by older? Just that it's running version 2 of the docker compose spec? There is a difference in services and the example uses images from docker hub while the fin-server dev version builds local images. Is that what you need help with?

Just FYI you should be able to start up fin-server dev and then use the example repo's import scripts to add data if you are interested in modifying the fin source.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/ucd-library/csus-sp-2018/issues/56#issuecomment-419166881, or mute the thread https://github.com/notifications/unsubscribe-auth/ATvx3LEVV21coGJ60XwLbXzPUtzHoSM5ks5uYVPHgaJpZM4WZWMm .

jrmerz commented 6 years ago

That file is required for wiring up Stackdriver Logging services. The app should work w/o the file, so that's a bug. Will fix.

jrmerz commented 6 years ago

Update. Looking at the source, you should remove the mount point to webapp-service-account.json in docker compose and try again.

DerekMaggio commented 6 years ago

@qjhart and @jrmerz Do you want us to use the existing UI of the example-repo. For instance, use the existing login in page? Or do you want us to design something specific to just this application

jrmerz commented 6 years ago

I would say use the basic-auth service as a starting point, so copy, figure how it works (for both UI and login flow) then go from there.

DerekMaggio commented 6 years ago

Important: Docker Build and Teardown Scripts

build script teardown script

tl;dr:

I got the docker images working on localhost so you can develop on your own systems. The script that I have is a bash script ran on my UNIX system. I do not know if it will work in git bash on Windows or if it will work on a Mac.


The long story:

Most of the commands with the exception of sudo sysctl -w vm.max_map_count=26214 are just docker commands so they should work fine.

I have to run the above command to increase the resources available to the elastic search

In order to get us up and running in the short term we can create the images step by step on Tuesday and you guys can develop on them.

In the long term we should create a PowerShell Script for Windows Users and if my script does not work for Mac create another one for Mac.

The commands should transfer relatively easily to a PowerShell Script @ctlevinsky I think you would be the best to work on this.