Last updated Oct 19, 2022

Rate this page:

Getting started

Prerequisites

Installation

  • Clone the repo git clone git@bitbucket.org:atlassian/admin-portfolio.git
  • Run mvn compile in the repo's root directory
    • This will install all dependencies and compile the project

Running the Service Locally

You can run/debug your service using IDEA, or from the command line:

1
2
mvn spring-boot:run

Once the service is running, you can hit its healthcheck: curl http://localhost:8080/healthcheck or explore its API by navigating to http://localhost:8080/. If you have ASAP plugin installed for Atlas CLI, you can make a request to the example REST API: atlas asap curl http://localhost:8080/api/greetings/charlie.

Connect to AWS

You can also run your service in your laptop, but connecting to AWS resources like ES, SQS, S3 and others. In order to do that, use the Atlas CLI to assume the role of your service (Note: the tokens are only valid for a few hours):

1
2
atlas micros service assume -s admin-portfolio -e ddev -o env -f envvars.sh
source envvars.sh
MICROS_ENV=ddev mvn spring-boot:run

If you get a "StatsDClientException: Failed to lookup StatsD host" error, please add statds as an alias to localhost in your /etc/hosts.

Running Test

You can run all the tests via

1
2
mvn test

Note: In order to run integration tests, you must have Docker installed and running.

Next Steps

Check out the following pages for more information Admin-Portfolio:

Rate this page: