-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker dev env #5583
Docker dev env #5583
Conversation
I will also need to make a commit to the ui repo so that we can set the host names its web server proxy uses to talk to hoot services. |
curious if vagrant machine used by jenkins has capped resources (same way vagrant vm does for local dev) and if so we can speed up tests by using the containers? |
* legacy hoot submodule hoot-ui/ has been removed * don't need hootenanny-id in core-services container add parent submodule git volume to frontend to allow npm deps from github to work * use node 14 to match core-services, install git for use in npm * don't need deploy frontend to tomcat add a make clean target just deploy exploded webapp, not war file * use unprotected auth endpoint as health check * don't need hootenanny-id dir in tomcat * add clean property, remove UI mention from build services property * Submodule hoot-ui-2x 9df7cba39..ba88f7ad9: > dist/build updates > use https to fetch github dependency, refresh lock versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeyeye 💪 🕶️
HOOT_VERSION_FILE: hoot-core/src/main/cpp/hoot/core/info/VersionDefines.h | ||
-include HOOT_VERSION_FILE | ||
|
||
hoot-core/src/main/cpp/hoot/core/info/VersionDefines.h: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bmarchant I made this change because we need HOOT_VERSION_GEN
to always run. I had whacked a FORCE
target that I didn't consider the impact of here cbbaa64 that I think necessitated your change that I'm now fixing with .PHONY
.
For some reason the make archive
step was failing in some iterations where I tried to restore FORCE
and in other iterations it was leading to an infinite loop calling HOOT_VERSION_GEN
.
This configuration seems to work in forcing the regeneration of VersionDefines.h on every build without the above defect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will regenerating VersionDefines.h
every time make
is run cause a major rebuild? If so, this would slow down compilation during development of Hootenanny outside of docker containers. Maybe somewhere in the docker container the change could be made using sed
or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think with the older FORCE
target this should have also been the case. But the HOOT_VERSION_GEN
script only regenerates VersionDefines.h
if the version has actually changed so I think it should be ok. If it has changed that would necessitate a core rebuild of the three cpp classes that include it.
# Conflicts: # hoot-ui-2x
# Conflicts: # hoot-ui-2x
> Merge remote-tracking branch 'origin/hoot2x' into docker_updates
docker/Dockerfile.core-services
Outdated
ARG glpk_version=4.64 | ||
ARG liboauthcpp_version=0.1.0 | ||
ARG libphonenumber_version=8.12.39 | ||
ARG libpostal_version=1.1 | ||
ARG node_version=14.16.1 | ||
ARG npm_version=6.14.12 | ||
ARG v8_version=8.4.371.19 | ||
ARG stxxl_version=1.3.1 | ||
ARG armadillo_version=10.8.2 | ||
ARG gdal_version=3.2.3 | ||
ARG geos_version=3.9.3 | ||
ARG libgeotiff_version=1.6.0 | ||
ARG proj_version=7.2.1 | ||
ARG devtoolset_version=8 | ||
ARG v8_version=8.4.371.19 | ||
ARG stxxl_version=1.3.1 | ||
ARG postgresql_version=14 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way of combining the values found here with the above versions? Also if you notice in that file, Hoot is being built and tested against Postgres 13 not 14. Probably not a big deal but it is already out of sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 good idea
I can look into it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also have some versions here https://github.com/ngageoint/hootenanny-rpms/blob/master/config.yml
* consolidate lib version configs in VagrantProvisionVars.sh for now * add other ARG values * move versions to .env template file * missed adding this template file * downgrade glpk * use PG 14 * don't need bash * these are written in by Makefile.docker * PG 13 is now working for me
# Conflicts: # hoot-ui-2x
> update build info > Docker updates (#2050) > update build info > Bump semver from 5.7.1 to 5.7.2 (#2063) > Bump word-wrap from 1.2.3 to 1.2.4 (#2064) > Treat folders with null parent id as being under root (id=0) (#2065) > update build info > Add option to clip grail pull data to extent (#2062) < replace with hoot2x (reverting lock update) < Merge remote-tracking branch 'origin/hoot2x' into docker_updates < Merge remote-tracking branch 'origin/hoot2x' into docker_updates < dist/build updates < use https to fetch github dependency, refresh lock versions
docker-compose.yml
and a set of new scripts in thedocker
anddocker/scripts
folder that together build a development environment.Makefile.docker
that adds easy aliases to the docker compose commands as well as commands that make sure needed gitignored files/folders are present before docker starts building images/running containers.One of the requirements we came up with when discussing this was the ability to edit any of the services/core code and recompile it like you can with vagrant.
This can be achieved by updating any one of the
HOOT_BUILD_*
, found in thehoot.env
, to equal 1. Then restart the containers. Thecore-services-entrypoint.sh
will notice this and force recompile/build of the var's corresponding software.I did not test for the java or node services, though probably should, but I did prove this for core.
After first compiling, I made a small a spelling mistake in the version class. A
After flipping on the core var in hoot.env and restarting the containers, I saw my spelling mistake when running
hoot info
If you've already been using vagrant to do your local dev you might need to run
make clean
ormake distclean
since files like theMakefile
will have hardcoded paths meaningful only to the vm.