biosimulations / biosimulations

A platform for sharing and reusing biomodeling studies including models, simulations, and visualizations of their results
https://biosimulations.org
MIT License
39 stars 14 forks source link

Building for various environments is broken #3625

Closed bilalshaikh42 closed 2 years ago

bilalshaikh42 commented 2 years ago

With the new setup, It seems that a separate docker image must now be built for each environment, as the endpoints are determined at compile time. If so, this needs to be reverted. The same docker image must be useable in all environments by just changing the environment variables defined. This might be causing the current issues on the deployment.

@jonrkarr how are the docker images being handled?

jonrkarr commented 2 years ago

prod has not been redeployed. The production issues are different.

In that case, the Docker images need to be changed. Because Angular apps cannot read environment variables, configuration variables need to be mixed in at build time.

bilalshaikh42 commented 2 years ago

This is why the configuration I had set up the endpoints to dynamically take in a particular environment from a variable. To allow backed environments to use the env variables and have the same docker image run across environments. This is an absolute requirement for anything to work on the Kubernetes cluster/independently. A docker image needs to be able to change the endpoints based on the environment that it is in.

bilalshaikh42 commented 2 years ago

The angular apps need to have the endpoints defined at compile-time, which can be done either by the configurations or just by replacing the file manually. It did not make sense to me to define separate build targets and hardcode those in, when a simple mv command would allow for the setting of any arbitrary combination of the variables. This current system would not allow for testing against custom deployments without changing all the targets across the apps

bilalshaikh42 commented 2 years ago

Can we revert the state of the repo back to: 9d980c08d379e7725ecffd9b0531f183e7aa2702` And then cherry pick the following commits to include the other changes: fce434727d36d28f048ea3b2d852ab56574a6768, 140576b343f49a770a59130190d4f1467fb8c8e4, dfc2541b22644ac89bd2273e057cb44b84e0cd98, 9ab532d8971c0795449a02c7f794d2ab26caa105, b3109a1fa5d37d0a65134adde6d9aaef90b19ac0,

bilalshaikh42 commented 2 years ago

Changes reverted in #3626

jonrkarr commented 2 years ago

File replacements are basically the same as moving files, except organized in a consistent way.

jonrkarr commented 2 years ago

@bilalshaikh42 are you going to cherry pick those commits?

bilalshaikh42 commented 2 years ago

Should be done, did I miss something?

bilalshaikh42 commented 2 years ago

Seems I did not go far back enough

jonrkarr commented 2 years ago

I think the HSDS issue is related to configuration changes, not these commits. Directly running hsls doesn't work either.

biosimulations-daemon commented 2 years ago

:tada: This issue has been resolved in version 7.0.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: