SCIM Local Development Setup
Author:
Fluent Commerce
Changed on:
8 May 2024
Key Points
- Local development uses localstack to emulate AWS services
- AWS CLI Configuration is optional
- IntelliJ and Eclipse / STS Setup in local environment
Steps
Localstack
Local development uses localstack to emulate AWS services. Run the command below to have the image downloaded and the container is running. Note that the container is always set to run unless stopped. Be aware that secrets and messages are not persisted between server restarts.
1docker-compose -f docker-compose.yml up -d localstack
Language: sh
Name: localstack command
Description:
[Warning: empty required content area]AWS CLI Configuration (Optional)
This is only required if one wants to send events to the queues in localstack or manage secrets through the AWS CLI outside the localstack container. Run the AWS configuration and set your profile. The access key values can be anything, but the region has to be us-east-1
1aws configure --profile localstack
2export AWS_PROFILE=localstack
Language: sh
Name: AWS profile
Description:
[Warning: empty required content area]!!! Please note that localstack region is defaulted to "us-east-1".
IntelliJ Setup
Create a run configuration setting the spring profiles and environment variables and selecting the correct pre-configured localstack AWS profile. The application runs the same way as in production, achieved by the properties below.
- Active Profiles: ,
`connector`
`dev`
- profile is always required, and it can be followed by the environment the application is running on (dev, test, qa or production).
`connector`
- is a handy profile for local development with AWS. It enables the SDK to auto-start the queue and use some pre-configured values for development.
`dev`
- AWS credential profile/region: Select the localstack profile and set the region to US-EAST-1.
Ensures the region matches with localstack and allows Spring to do the correct wiring of the AWS libraries.
For the IntelliJ community version, pass the spring profile configuration as JVM parameters:
1-Dspring.profiles.active=connector,dev
Language: sh
Name: Spring profile
Description:
[Warning: empty required content area]Eclipse / STS Setup
Create a run configuration and set the spring profiles.
Dependencies
Here are the required dependencies :
1<dependency>
2 <groupId>com.fluentcommerce.connect</groupId>
3 <artifactId>connect-sdk-core</artifactId>
4</dependency>
5<dependency>
6 <groupId>com.fluentcommerce.connect</groupId>
7 <artifactId>connect-sdk-core-aws</artifactId>
8</dependency>
9<dependency>
10 <groupId>com.fluentcommerce.connect</groupId>
11 <artifactId>connect-sdk-core-web-security</artifactId>
12</dependency>
Language: xml
Name: pom.xml
Description:
[Warning: empty required content area]