Migrate Java Swing ANT based application to GCP

2/12/2021

We have a ANT based Java Swing application which currently get deployed on Solaris. We build .deb file for download and piggyback on on-premise server to download for user. Now, as we are moving to GCP, I am doing research to make it as smooth as possible. I have following concern in this regard:

  1. Kubernetes runs containers so we need to deploy container images, so do I have to build a container image as one of the build or can I store .deb build some where on GCP volume to download ?
  2. If build process need to be change, how to approach containerization of ANT based Java Swing project?
-- Moosa
ant
docker
google-cloud-platform
java
kubernetes

1 Answer

2/15/2021

The basic deployable unit in Kubernetes is a Pod. If you want to create Pod/Deployment resources, you need to specify container image you want to run and there is no way to use .deb package instead.

You can use already existing Apache Ant image e.g. webratio/ant as your base container image or create new one by defining a Dockerfile. For more information on creating and deploying containerized applications, see this tutorial.

Of course you don't have to manually build container images every time, you may use CI/CD software such as Cloud Build or GitLab CI/CD to build an image and even deploy resources on Kubernetes cluster.

-- matt_j
Source: StackOverflow