Deploy Account Management User Interface
note
Account Management API is now deprecated and we recommend that you use Account Management functionality built into Elastic Path Commerce 8.2 and later.
Pre-requisites
- Ensure that all requirements described in the Requirements section are met.
- Ensure that you have access to the machine with yarn and npm installed on it.
- Ensure that you have access to the
account-management-2.2.x.zip
file in the Elastic Path public Nexus repository. - Ensure that the Keycloak initialization is complete and the access details and
client id
are available.
Procedure
- Extract the files in the
account-management-2.2.x.zip
file.- Ensure that all contents including the
account-management-app
folder is extracted. This folder contains the code to build the Docker image.
- Ensure that all contents including the
- On your computer, build the Docker image by using
account-management-app/docker/Dockerfile
)- Ensure that you build the Docker image by running the following command in the parent directory:
cd account-management-2.2.x/account-management-app/
docker build -f ./Dockerfile .
Push the Docker image to Amazon ECR(Elastic Container Registry).
Deploy the Docker image in Amazon ECS (Elastic Container Services) with appropriate parameters.
For more information, see the Docker Image Environment Variables section.
Create and configure a new Amazon ELB(Elastic Load Balancer) with the Amazon ECS service and appropriate SSL certificates.
Docker Image Environment Variables
Parameter | Value |
---|---|
INSTANCE_URL | The Account Management user interface URL |
KEYCLOAK_LOGIN_URL | The Keycloak URL to which the Account Management UI redirects when you login. For example, https://<KEYCLOAKURL>/auth/realms/<REALM ID>/protocol/openid-connect/auth |
KEYCLOAK_LOGOUT_URL | The Keycloak URL to which the account management user interface redirects when you log out. For example, https://<KEYCLOAKURL>/auth/realms/<REALM ID>/protocol/openid-connect/logout |
KEYCLOAK_CLIENT_ID | The Client ID that is used for the account management user interface when creating the clients. |
COMMERCE_MANAGER_URL | The URL for the Commerce Manager instance |
ADMIN_API_URL | The URL for the Account Management API Service. For example: https://<ACCOUNT-MANAGEMENT-API>/ |
Localization
Optionally, you can add up to ten additional locales to your deployment. To add a new locale, do the following:
- Copy the existing translation file:
account-management-2.2.x/account-management-app/src/locales/en-US.json
- Translate the strings for the keys in your new json file.
- Host the file on the web with CORS (Cross Origin Resource Sharing) headers enabled.
- Add the following environment variables to your deployment:
ADDED_LOCALE_<INDEX>_NAME
: The locale Identifier of the new locale, for examplefr-FR
.ADDED_LOCALE_<INDEX>_TITLE
: Name of the new locale to be shown in the language dropdown, for exampleFrançaise
.ADDED_LOCALE_<INDEX>_JSON_PATH
: URL path to the hosted JSON file with translations, for examplehttps://my.website.com/locales/fr-FR.json
.
You can set the <INDEX>
parameter from 0 through 9 for a total of 10 additional locales.
View and test the changes with the docker compose deploy by adding the environment variables to the env
file:
account-management-2.2.x/local-deployment/am.env
Validating User Interface Deployment
Use this procedure to verify that the Elastic Path Account Management service deployment is complete and successful in AWS (Amazon Web Services ).
Go to the Account Management user interface URL.
The system redirects you to the Keycloak login page.
Log in to Keycloak with the seller administrator credentials.
The system redirects you to the Account Management user interface to continue with the login.