Giter Site home page Giter Site logo

dn24-boot3-workshop's Introduction

Workshop Setup

This file can be used to check that you have correctly installed everything that you need for the workshop.

Java

You will need at least Java 17 with to run this workshop but we will use Java 21 since it's the latest LTS.

We recommend using SDKMAN! to manage installed Java versions, but you're free to use whatever you prefer as long as at least Java 17 is available. On Windows, you will need bash to use SDKMAN! (Git Bash, MinGW, Cygwin, WSL, etc.), if you don't want to install it you can try CHOCOLATEY! too.

SDKMAN!

The following instructions can be used if you are using SDKMAN!

  1. Install SDKMAN! for your system by following instructions at https://sdkman.io/
  2. Install Java by typing sdk install java 23.1.2.r21-nik

Check the Java version:

sdk use java 23.1.2.r21-nik
java --version

You should see a similar output:

openjdk 21.0.2 2024-01-16 LTS
OpenJDK Runtime Environment Liberica-NIK-23.1.2-1 (build 21.0.2+14-LTS)
OpenJDK 64-Bit Server VM Liberica-NIK-23.1.2-1 (build 21.0.2+14-LTS, mixed mode, sharing)

CHOCOLATEY! (Windows)

The following instructions can be used if you are using CHOCOLATEY!

  1. Install CHOCOLATEY! for your system by following instructions at https://community.chocolatey.org/
  2. Install Java by running the following in a PowerShell as Administrator:
choco install graalvm-java21

Check that you can use Java:

  1. Open System Properties
  2. Click Environment Variables... and verify the PATH and JAVA_HOME System Variables to use the right JDK paths
  3. Open a new PowerShell window and check the Java version
java --version

Without SDKMAN! or CHOCOLATEY!

If you prefer not to use SKDMAN! or CHOCOLATEY! you can install Java whichever way you're most comfortable with. As long as you have at least Java 17, you should be fine.

Please check your installation by checking the output of java --version:

java --version

You should see a similar output:

openjdk 21.0.2 2024-01-16 LTS
OpenJDK Runtime Environment Liberica-NIK-23.1.2-1 (build 21.0.2+14-LTS)
OpenJDK 64-Bit Server VM Liberica-NIK-23.1.2-1 (build 21.0.2+14-LTS, mixed mode, sharing)

Maven

This workshop uses mvnw so you shouldn't need to install Maven directly.

To check that Maven works run the following command from this directory.

On Linux/Mac

./mvnw --version

On Windows

mvnw.cmd --version

If you want to ensure your local Maven cache has most of the files we'll need, you can build the pom files in this directory:

./mvnw package

You should see a "success" message after these command:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

Docker Compose

We will be using Docker Compose to setup things like Postgres which we will need for the workshop. We recommend Docker Desktop if possible, but any Docker installation that can run docker compose should work fine.

Docker Desktop is free for educational purposes.

Please install Docker from https://www.docker.com or using your favorite open source distribution.

To check docker is running, you can run:

docker run --rm hello-world

To check docker compose is working, run the following from this directory:

docker compose -f docker-compose-hello.yml up

Once you see the "hello world" output, you can destroy the containers using:

docker compose -f docker-compose-hello.yml down

TIP: Depending on your installation, you might need to use the command docker-compose rather than docker compose (this usually means that you are using an older version, please consider upgrading).

If the hello world example works, then you can try starting the full docker compose configuration that we'll be using:

cd dog-service
docker compose up

NOTE: it will take some time to initially start the containers

Check that the following links work:

http://localhost:9090 (Prometheus) http://localhost:3000 (Grafana)

If everything works you can hit ctrl-c to stop docker compose and you can destroy the containers using:

docker compose down

HTTPie

We'll need to make some REST calls to our application. You can use whatever tool you like, but if you have no preference we recommend HTTPie.

You can install it from https://httpie.io/

IDE

You can use any Java IDE you like to work with the code, just check that it can work with Maven projects.

Please import the dog-service project.

dn24-boot3-workshop's People

Contributors

jonatan-ivanov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.