- In Visual Studio Code, open the integrated terminal.
- Navigate to the root directory of your Java application project.
- Build the application (assuming you have the necessary build tools):
./mvnw clean package
- Start the application in Quarkus development mode:
./mvnw quarkus:dev
- Open a web browser.
- Navigate to
http://localhost:8080
in the address bar. - Verify that your Java application is running successfully.
- To trigger building and deploying a container image you need to enable the
quarkus.kubernetes.deploy
flag (the flag is disabled by default - furthermore it has no effect during test runs or dev mode). This can be easily done with the command line:./mvnw clean package -Dquarkus.kubernetes.deploy=true
-
Ensure you have Tilt installed and properly configured.
-
Create a Tiltfile (usually named
Tiltfile
) in your project directory to define your deployment configuration. -
Inside the Tiltfile, specify the configuration for deploying your application to OpenShift using Tilt.
-
In your terminal, navigate to the project directory.
Run Tilt to start the deployment:
export WORKSPACE_NAMESPACE=admin-devspaces && tilt up
Tilt will automatically deploy your application to OpenShift based on your configuration.
Monitor the deployment progress and logs in the Tilt UI or terminal.
-
Access Your Deployed Application. Once the deployment is successful, access your deployed application through the provided route.
-
Kill
tilt up
-
In the first terminal, run
./mvnw oc:remote-dev
to start the remote dev proxy service. Once that starts, move to the second terminal and run./mvnw oc:remote-dev
-
Once that starts, move to the second terminal and run
./mvnw quarkus:dev
-
Access Your Local Application through the provided route and start your remote development.
A Devfile is a configuration file that defines the development environment for a project, including the necessary tools, dependencies, and development settings. It allows developers to set up consistent development environments quickly and share them with others. In the context of OpenShift DevSpaces, Devfiles are used to define the development environment for a project.
-
Create your workspace
-
Once the workspace starts you can already work, no need to worry about tools and configuration.
-
Inside the config directory, there are example user configurations to customize your workspaces:
github.yaml -> github credentials git.yaml -> git config dockerjsonconfig.yaml -> container engine login
Once you applied the workspaces is restarted automatically.
-
Build the application (assuming you have the necessary build tools):
./mvnw clean package
-
Start the application in Quarkus development mode:
./mvnw quarkus:dev
OpenShift DevSpaces detects the port and exposes it on the route.
-
In your terminal
Run Tilt to start the deployment:
tilt up
Tilt will automatically deploy your application to OpenShift based on your configuration.
Monitor the deployment progress and logs in the Tilt UI or terminal.
-
Access Your Deployed Application. Once the deployment is successful, access your deployed application through the provided route.
-
Kill
tilt up
-
In the first terminal, run `./mvnw oc:remote-dev`` to start the remote dev proxy service. Once that starts, move to the second terminal and run
./mvnw oc:remote-dev
-
Once that starts, move to the second terminal and run
./mvnw quarkus:dev