Closed pgoldtho closed 2 years ago
There are 2 issues that need to be solved when packaging the installation:
RUN $(npm bin)/ng build --prod
is called during the docker build. Its value is embedded in a minified file that cannot be updated at runtime.The K8S deployment uses a load balancer to workaround these issues. The API and UI servers are bound to the same namespace
Need to decide whether to deploy as a containerized application or OS native installation
https://cloud.google.com/community/tutorials/migrate-oracle-postgres-using-ora2pg
Google changed the terms and conditions for publishing images to Cloud Marketplace. Publishing is no longer possible
Product should be packaged as a virtual machine image. Follow Cloud Marketplace instructions
The image should include versions of Ora2Pg + Visulate for Oracle. Container images for it are in the Google Container Repo - gcr.io/visulate-llc-public/visulate-for-oracle
The v4oracle README has instructions for running in a docker container. These haven't been tested for a while and may need to be adapted.
Angular stores environment variables like the API server location in a file that gets copied into the app bundle at build time. The file contents are concatenated with other sources into a single minified file. The file checked into source control relies on a load balancer to resolve API calls. It needs to be edited if a load balancer is not being used. Review apiBase value in
visulate-for-oracle/ui/src/environments/environment.prod.ts
and edit to match the API server deployment value. For example, if you plan to deploy the API server on a VM called my-api-server.com the file would look like this:The API server rejects cross origin requests from URLs that have not been whitelisted. Edit
visulate-for-oracle/api-server/config/http-server.js
to specify the origin server where the UI will be running. For example if the UI will be served from port 8080 of my-ui-server.com:Pull the docker images:
Docker pull of UI won't work. Need to figure workaround to custom build requirement
Deploy the images:
(Optional) bind the log file directories to a persistent volume (e.g /var/log/some-directory)
docker run --rm -d -p 80:80/tcp \ -v /var/log/visulate-client:/var/log/nginx \ gcr.io/visulate-llc-public/visulate-for-oracle/ui:1.1
docker run -d -p 3000:3000/tcp \ -v /home/pgoldtho/config:/visulate-server/config \ -v /var/log/visulate-server:/visulate-server/logs \ gcr.io/visulate-llc-public/visulate-for-oracle:1.1