### List Available Project Versions in ECR Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/docs/AWS_CLI.md Lists all available image versions for a specified project within an AWS ECR repository. The output is formatted as a table for easy readability. Use the `--repository-name` flag to specify your project. ```shell aws ecr list-images --repository-name [project_name] --no-paginate --output table ``` -------------------------------- ### Install and Use Eureka CLI (Go) Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md This section demonstrates how to install the Eureka CLI globally using 'go install' and then use its 'deployApplication' command. Alternatively, it suggests using the binary directly from its path if global installation is not desired. ```bash go install eureka-cli deployApplication ``` ```bash ./bin/eureka-cli deployApplication ``` -------------------------------- ### Build and Install Eureka CLI Binary System-Wide Source: https://context7.com/folio-org/eureka-setup/llms.txt This section details how to build the platform-specific binary for eureka-cli and install it for system-wide use. It covers building for Windows, Linux, and macOS, and then installing the binary globally. Dependencies include Go. The output is an executable binary that can be run from any directory. ```bash # Build for Windows mkdir -p ./bin env GOOS=windows GOARCH=amd64 go build -o ./bin/ . # Build for Linux env GOOS=linux GOARCH=amd64 go build -o ./bin/ . # Build for macOS env GOOS=darwin GOARCH=amd64 go build -o ./bin/ . # Install binary system-wide go install # Use from any directory euroka-cli deployApplication # Or use relative path without install ./bin/eureka-cli -c ./config.combined.yaml deployApplication ``` -------------------------------- ### Module Environment Configuration (PostgreSQL, Kafka, Okapi) Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/docs/DEVELOPMENT.md These configuration snippets define environment variables for PostgreSQL, Kafka, and Okapi services. They are used when running module instances locally, typically within an IDE like IntelliJ. Ensure these settings match your local development environment. ```conf ; PostgreSQL DB_HOST=localhost DB_PORT=5432 DB_DATABASE=folio DB_USERNAME=folio_rw DB_PASSWORD=supersecret DB_CHARSET=UTF-8 DB_MAXPOOLSIZE=50 DB_QUERYTIMEOUT=60000 ; Kafka ENV=folio KAFKA_HOST=localhost KAFKA_PORT=9092 ; Okapi (compatible with Kong) OKAPI_HOST=localhost OKAPI_PORT=37001 OKAPI_SERVICE_HOST=localhost OKAPI_SERVICE_PORT=37001 OKAPI_SERVICE_URL=http://localhost:37001 OKAPI_URL=http://localhost:37001 ``` ```conf ; PostgreSQL DB_HOST=localhost DB_PORT=5432 DB_DATABASE=folio DB_USERNAME=folio_rw DB_PASSWORD=supersecret DB_CHARSET=UTF-8 DB_MAXPOOLSIZE=50 DB_QUERYTIMEOUT=60000 ; Kafka ENV=folio KAFKA_HOST=localhost KAFKA_PORT=9092 ; Okapi (compatible with Kong) OKAPI_HOST=localhost OKAPI_PORT=37002 OKAPI_SERVICE_HOST=localhost OKAPI_SERVICE_PORT=37002 OKAPI_SERVICE_URL=http://localhost:37002 OKAPI_URL=http://localhost:37002 ``` -------------------------------- ### Build Eureka CLI Binaries for Multiple Platforms Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/docs/BUILD.md This command sequence first creates necessary output directories and then uses Go's cross-compilation capabilities to build the Eureka CLI for Windows, Linux, and MacOS across x86 and ARM architectures. Ensure Go is installed and configured for cross-compilation. ```bash mkdir -p ./bin/eureka-cli-windows-x86 ./bin/eureka-cli-linux-x86 ./bin/eureka-cli-darwin-x86 ./bin/eureka-cli-darwin-arm env GOOS=windows GOARCH=amd64 go build -o ./bin/eureka-cli-windows-x86 . env GOOS=linux GOARCH=amd64 go build -o ./bin/eureka-cli-linux-x86 . env GOOS=darwin GOARCH=amd64 go build -o ./bin/eureka-cli-darwin-x86 . env GOOS=darwin GOARCH=arm64 go build -o ./bin/eureka-cli-darwin-arm . ``` -------------------------------- ### Build Eureka CLI Binary (Go) Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md This command builds a platform-specific binary for the Eureka CLI. It requires Go to be installed and configured. The output binary is placed in the ./bin/ directory. ```bash mkdir -p ./bin env GOOS=windows GOARCH=amd64 go build -o ./bin/ . ``` -------------------------------- ### Intercept Modules with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/docs/DEVELOPMENT.md This command intercepts specified modules using the Eureka CLI, allowing for local development and testing. It requires a configuration file and specifies the module ID, whether to use the default gateway, and the module and sidecar ports. The ports can be adjusted based on your local setup. ```bash eureka-cli -c config.combined.yaml interceptModule -i mod-orders:13.1.0-SNAPSHOT.1021 -g -m 36001 -s 37001 eureka-cli -c config.combined.yaml interceptModule -i mod-finance:5.2.0-SNAPSHOT.289 -g -m 36002 -s 37002 ``` -------------------------------- ### List Deployed System Containers with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Lists all currently deployed system containers within the Eureka setup. ```bash eureka-cli listSystem ``` -------------------------------- ### Configure VSCode Debugger for Eureka CLI Commands (JSON) Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/docs/DEVELOPMENT.md This configuration enables debugging of Eureka CLI commands within VSCode. It requires the Go extension and defines launch configurations for specific commands like 'deployApplication' and 'interceptModule'. The 'args' field can be modified to debug different commands. ```json { "version": "0.2.0", "configurations": [ { "name": "Eureka CLI deployApplication command", "type": "go", "request": "launch", "mode": "auto", "program": "${cwd}/eureka-cli", "output": "${cwd}/bin/eureka-cli-debug.exe", "env": { "GOOS": "windows", "GOARCH": "amd64" }, "args": ["--config", "config.combined.yaml", "deployApplication", "-d"], "showLog": true }, { "name": "Eureka CLI interceptModule command", "type": "go", "request": "launch", "mode": "auto", "program": "${cwd}/eureka-cli", "output": "${cwd}/bin/eureka-cli-debug.exe", "env": { "GOOS": "windows", "GOARCH": "amd64" }, "args": [ "--config", "config.combined.yaml", "interceptModule", "-i", "mod-orders:13.1.0-SNAPSHOT.1021", "-m", "http://host.docker.internal:36001", "-s", "http://host.docker.internal:37001" ], "showLog": true } ] } ``` -------------------------------- ### Intercept Eureka CLI Modules (Bash) Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/docs/DEVELOPMENT.md These bash commands demonstrate how to intercept specific modules within the Eureka environment. It first lists available modules and then shows how to intercept 'mod-orders' and 'mod-finance' by providing their IDs and relevant network addresses. Ensure 'host.docker.internal' is correctly configured. ```bash # Find the module id that you want to intercept with listModules command evereka-cli -c config.combined.yaml listModules evereka-cli -c config.combined.yaml interceptModule -i mod-orders:13.1.0-SNAPSHOT.1021 -m http://host.docker.internal:36001 -s http://host.docker.internal:37001 evereka-cli -c config.combined.yaml interceptModule -i mod-finance:5.2.0-SNAPSHOT.289 -m http://host.docker.internal:36002 -s http://host.docker.internal:37002 ``` -------------------------------- ### Deploy Search Application with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Deploys the 'search' child application, providing Elasticsearch capabilities essential for the Inventory App and ECS setup. Deployment can be initiated using a configuration file or a profile flag. ```bash eureka-cli -c ./config.search.yaml deployApplication ``` ```bash eureka-cli -p search deployApplication ``` -------------------------------- ### Eureka CLI Application Deployment Configuration Structure Source: https://context7.com/folio-org/eureka-setup/llms.txt This YAML snippet illustrates the configuration structure for deploying applications using eureka-cli. It defines profile settings, application details, registry information, installation sources, namespaces, environment variables for database, Kafka, Kong, and Keycloak, tenant configurations, roles, users, and sidecar module settings. This comprehensive configuration allows for detailed customization of deployments. ```yaml # config.combined.yaml profile: name: combined application: name: app-combined version: 1.0.0 platform: base fetch-descriptors: false port-start: 30000 port-end: 30999 # gateway-hostname: 172.17.0.1 # Uncomment for Linux registry: url: https://folio-registry.dev.folio.org install: folio: https://raw.githubusercontent.com/folio-org/platform-complete/snapshot/install.json eureka: https://raw.githubusercontent.com/folio-org/platform-complete/snapshot/eureka-platform.json namespaces: platform-complete-ui: folioci # DockerHub namespace for UI images environment: # PostgreSQL DB_HOST: postgres.eureka DB_PORT: 5432 DB_DATABASE: folio DB_USERNAME: folio_rw DB_PASSWORD: supersecret DB_CHARSET: UTF-8 DB_QUERYTIMEOUT: 60000 DB_MAXPOOLSIZE: 4 # Kafka ENV: folio KAFKA_HOST: kafka.eureka KAFKA_PORT: 9092 KAFKA_PRODUCER_TENANT_COLLECTION: ALL # Kong API Gateway KONG_ADMIN_URL: http://kong.eureka:8001 KONG_INTEGRATION_ENABLED: "true" # Keycloak KC_URL: http://keycloak.eureka:8080 KC_CONFIG_TTL: 3600s KC_ADMIN_CLIENT_ID: supersecret KC_ADMIN_USERNAME: admin KC_ADMIN_PASSWORD: admin KC_IMPORT_ENABLED: "true" KC_INTEGRATION_ENABLED: "true" KC_LOGIN_CLIENT_SUFFIX: -application KC_SERVICE_CLIENT_ID: sidecar-module-access-client # Java options for debugging JAVA_OPTIONS: >- -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -XX:MaxRAMPercentage=80.0 -Xms128m -Xmx400m tenants: diku: deploy-ui: true roles: diku_admin_role: tenant: diku capability-sets: ["all"] diku_user_role: tenant: diku capability-sets: [] users: diku_admin: tenant: diku password: admin last-name: John first-name: Doe roles: ["diku_admin_role", "diku_user_role"] diku_user: tenant: diku password: user last-name: Jane first-name: Doe roles: ["diku_user_role"] sidecar-module: image: folio-module-sidecar environment: ENV: folio KAFKA_HOST: kafka.eureka KAFKA_PORT: 9092 MOD_USERS_KEYCLOAK_URL: http://mod-users-keycloak-sc.eureka:8081 TM_CLIENT_URL: http://mgr-tenants.eureka:8081 AM_CLIENT_URL: http://mgr-applications.eureka:8081 TE_CLIENT_URL: http://mgr-tenant-entitlements.eureka:8081 SIDECAR: "true" SIDECAR_FORWARD_UNKNOWN_REQUESTS: "true" SIDECAR_FORWARD_UNKNOWN_REQUESTS_DESTINATION: http://kong.eureka:8000 QUARKUS_HTTP_PORT: 8081 backend-modules: mod-orders: version: "13.1.0-SNAPSHOT.1029" # local-descriptor-path: "/path/to/ModuleDescriptor.json" # Use local descriptor mod-invoice: version: "5.9.0-SNAPSHOT.398" frontend-modules: folio_users: version: "10.2.0" # local-descriptor-path: "/path/to/module-descriptor.json" # Use local descriptor ``` -------------------------------- ### Login to AWS ECR with Docker Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/docs/AWS_CLI.md Logs your Docker client into an AWS Elastic Container Registry (ECR) repository using credentials obtained from the AWS CLI. This command is essential for pulling or pushing container images to ECR. ```shell aws ecr get-login-password --region [region] | docker login --username [username] --password-stdin [account_id].dkr.ecr.[region].amazonaws.com ``` -------------------------------- ### Configure AWS CLI Access Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/docs/AWS_CLI.md Sets the AWS access key ID, secret access key, and default region for AWS CLI operations. Ensure you replace the bracketed placeholders with your actual credentials and desired region. ```shell aws configure set aws_access_key_id [access_key] aws configure set aws_secret_access_key [secret_key] aws configure set default.region [region] ``` -------------------------------- ### Perform Module and Sidecar Health Checks Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/docs/DEVELOPMENT.md These curl commands are used to perform health checks on the intercepted modules and their associated sidecars. They verify that the services are running and responsive. The expected responses indicate the status of the services. ```bash curl -sw "\n" --connect-timeout 3 http://localhost:36001/admin/health http://localhost:36002/admin/health ``` ```bash curl -sw "\n" --connect-timeout 3 http://localhost:37001/admin/health http://localhost:37002/admin/health ``` -------------------------------- ### Disable Module Interception with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/docs/DEVELOPMENT.md This command disables module interception for the specified modules using the Eureka CLI. It reverts the modules to their default state in the Eureka environment. This is typically done after completing local development or testing. ```bash eureka-cli -c config.combined.yaml interceptModule -i mod-orders:13.1.0-SNAPSHOT.1021 -r eureka-cli -c config.combined.yaml interceptModule -i mod-finance:5.2.0-SNAPSHOT.289 -r ``` -------------------------------- ### Get Edge API Key with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Generates an Edge API key for a given user and tenant, facilitating access to the Edge API. ```bash eureka-cli getEdgeApiKey -t diku -U diku_admin ``` -------------------------------- ### Get Keycloak Access Token with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Fetches the Keycloak Access Token for a specified tenant, which can be used for authentication with Keycloak. ```bash eureka-cli getKeycloakAccessToken -t diku ``` -------------------------------- ### Login to Kong Gateway using curl (Limited User) Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md This snippet shows how to get an access token from the Kong gateway using curl for a limited user. It's similar to the admin user login but uses different credentials. Ensure the `X-Okapi-Tenant` header is set correctly for the specific tenant. ```bash # Limited user: diku_user curl --request POST \ --url http://localhost:8000/authn/login-with-expiry \ --header 'Content-Type: application/json' \ --header 'X-Okapi-Tenant: diku' \ --data '{"username":"diku_user","password": "user"}' \ --verbose ``` -------------------------------- ### Enable Bash Autocompletion for Eureka CLI (Go) Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md This snippet shows how to enable command autocompletion for the Eureka CLI in a Bash shell. It uses 'go install' to ensure the CLI is available and then sources the completion script into the user's Bash profile. ```bash go install echo "source <(eureka-cli completion bash)" >> ~/.bash_profile source ~/.bash_profile ``` -------------------------------- ### Get Vault Root Token with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Retrieves the current Vault Root Token that is being used by the deployed modules. ```bash eureka-cli getVaultRootToken ``` -------------------------------- ### Get Edge API Key (Bash) Source: https://context7.com/folio-org/eureka-setup/llms.txt Generates an Edge API key for a given user and tenant combination using eureka-cli. Supports custom key length. ```bash # Get Edge API key for diku_admin user in diku tenant euroka-cli getEdgeApiKey -t diku -U diku_admin # Get Edge API key with custom length euroka-cli getEdgeApiKey -t diku -U diku_admin -l 32 # Output: diku_diku_admin_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ``` -------------------------------- ### Get Keycloak Access Token (Bash) Source: https://context7.com/folio-org/eureka-setup/llms.txt Retrieves a Keycloak master access token for a specified tenant using the eureka-cli. This is useful for authenticating with Keycloak for tenant-specific operations. ```bash # Get access token for diku tenant euroka-cli getKeycloakAccessToken -t diku # Get access token for ecs tenant euroka-cli getKeycloakAccessToken -t ecs # Output: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9... ``` -------------------------------- ### Enable Shell Autocompletion for Eureka CLI Source: https://context7.com/folio-org/eureka-setup/llms.txt This snippet provides instructions to enable command autocompletion for eureka-cli in Bash, Zsh, and Fish shells. It involves installing the tool and sourcing the completion script. Dependencies include the eureka-cli binary and the respective shell environment. This feature enhances user experience by providing command suggestions. ```bash # Bash shell (add to .bash_profile for auto-source on startup) go install echo "source <(eureka-cli completion bash)" >> ~/.bash_profile source ~/.bash_profile # Zsh shell echo "source <(eureka-cli completion zsh)" >> ~/.zshrc source ~/.zshrc # Fish shell euroka-cli completion fish | source # Test autocompletion: type "eureka-cli" and hit TAB ``` -------------------------------- ### Get Vault Root Token with Eureka CLI Source: https://context7.com/folio-org/eureka-setup/llms.txt Retrieves the Vault root token, which is used by modules for secrets management. The command outputs the current root token. ```bash # Get current Vault root token euroka-cli getVaultRootToken # Output: vault-root-token-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ``` -------------------------------- ### Intercept Module Gateway Service with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Intercepts a module gateway service in Kong to reroute traffic from the environment to a specific instance started in IntelliJ. This is useful for debugging by redirecting traffic to a local development instance. ```bash eureka-cli interceptModule -i mod-orders:13.1.0-SNAPSHOT.1029 -m http://host.docker.internal:36002 -s http://host.docker.internal:37002 ``` -------------------------------- ### Reindex Elasticsearch (Bash) Source: https://context7.com/folio-org/eureka-setup/llms.txt Reindexes inventory and instance records in Elasticsearch using eureka-cli. This command requires the 'mod-search' and 'elasticsearch' modules to be installed and configured. It supports reindexing for different profiles like 'search' or 'ecs'. ```bash # Reindex using current profile euroka-cli reindexElasticsearch # Reindex for search profile euroka-cli -p search reindexElasticsearch # Reindex for ecs profile euroka-cli -p ecs reindexElasticsearch ``` -------------------------------- ### Build and Deploy UI (Bash) Source: https://context7.com/folio-org/eureka-setup/llms.txt Commands for building and deploying the platform-complete UI container separately using eureka-cli. It includes options for building and pushing to DockerHub, undeploying the existing UI, deploying a new UI, and performing in-place deployments. ```bash # Build and push UI to DockerHub namespace euroka-cli buildAndPushUi -n {{namespace}} -t diku -u # Undeploy existing UI euroka-cli undeployUi # Deploy new UI container euroka-cli deployUi # Build and deploy UI in-place during deployment euroka-cli deployApplication -bu # Build and deploy only the UI image euroka-cli deployUi -bu ``` -------------------------------- ### Deploy Combined Application with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Deploys the combined application using the eureka-cli. Supports various flags for profile selection, configuration, debugging, and building images. If no profile or config file is provided, the 'combined' profile is inferred. ```bash eureka-cli -c ./config.combined.yaml deployApplication eureka-cli deployApplication -d eureka-cli deployApplication -R eureka-cli -p combined deployApplication eureka-cli -p combined -o deployApplication eureka-cli deployApplication -bu eureka-cli buildSystem eureka-cli buildSystem -u ``` -------------------------------- ### Deploy Combined FOLIO Application with Eureka CLI Source: https://context7.com/folio-org/eureka-setup/llms.txt Deploys a complete FOLIO environment including system containers, management modules, backend modules, UI, and test data. Supports various options for configuration, resource constraints, debug output, local image building, and overwriting existing configurations. ```bash # Deploy with default configuration euroka-cli deployApplication # Deploy with specific profile euroka-cli -p combined deployApplication # Deploy with only required system containers (resource-constrained environments) euroka-cli deployApplication -R # Deploy with debug output euroka-cli deployApplication -d # Build images locally and update Git repositories euroka-cli deployApplication -bu # Use custom config file euroka-cli -c ./config.combined.yaml deployApplication # Overwrite existing config files with upstream defaults euroka-cli -p combined -o deployApplication ``` -------------------------------- ### Build and Deploy Application/UI In-Place with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md These commands facilitate building and deploying application components or the UI image directly within the deployment lifecycle. The `-b` flag indicates building, and `-u` can be used to update local repositories. ```bash # Build and deploy all images including folio-kong, folio-keycloak and platform-complete eureka-cli deployApplication -b -u # Build and deploy only the platform-complete image eureka-cli deployUi -b -u ``` -------------------------------- ### Configure and Build UI Image with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md This section covers overriding the default Docker image namespace for `platform-complete-ui` and building the UI image separately. The `buildAndPushUi` command allows specifying a namespace and tag, with an option to update the local repository. ```yaml namespaces: platform-complete-ui: bkadirkhodjaev ``` ```bash eureka-cli buildAndPushUi -n {{namespace}} -t diku -u ``` -------------------------------- ### List Deployed Components with Eureka CLI Source: https://context7.com/folio-org/eureka-setup/llms.txt Queries and displays information about deployed system containers and modules. Allows listing all system containers, modules within the current profile, specific modules with sidecars, backend modules, sidecars, management modules, or all modules across all profiles. ```bash # List all system containers euroka-cli listSystem # List all modules in current profile euroka-cli listModules # List specific module and its sidecar euroka-cli listModules -m mod-orders # List only backend modules (no sidecars) euroka-cli listModules -M module # List only sidecars euroka-cli listModules -M sidecar # List only management modules euroka-cli listModules -M management # List all modules across all profiles euroka-cli listModules -a ``` -------------------------------- ### Deploy Local Backend Module Images with Eureka CLI Source: https://context7.com/folio-org/eureka-setup/llms.txt This snippet demonstrates how to build and deploy backend modules locally using custom descriptors. It involves building the module with Maven, creating a Docker image, and configuring the eureka-cli to use a local descriptor path and the custom image. Dependencies include Maven, Docker, and eureka-cli. It takes module directory, image name, version, and descriptor path as inputs. ```bash cd mvn clean package -DskipTests docker build --tag : . # Configure in config file (e.g., config.combined.yaml): # backend-modules: # mod-orders: # version: "13.1.0-SNAPSHOT.1029" # local-descriptor-path: "/path/to/mod-orders/target/ModuleDescriptor.json" # Deploy with local module euroka-cli deployApplication ``` -------------------------------- ### Deploy Edge Application with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Deploys the 'edge' child application, which offers modules and a mod-okapi-facade for interacting with the Edge API, Karate tests, or Mosaic integration. Deployment can be specified via a configuration file or a profile flag. ```bash eureka-cli -c ./config.edge.yaml deployApplication ``` ```bash eureka-cli -p edge deployApplication ``` -------------------------------- ### Deploy Export Application with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Deploys the 'export' child application, which includes modules and system containers for data export functionality, relying on MinIO and FTP. Deployment can be done via a configuration file or a profile flag. ```bash eureka-cli -c ./config.export.yaml deployApplication ``` ```bash eureka-cli -p export deployApplication ``` -------------------------------- ### Deploy ECS and Child FOLIO Applications with Eureka CLI Source: https://context7.com/folio-org/eureka-setup/llms.txt Deploys multi-consortium environments (ECS) with separate UI instances and tenants, or deploys child applications like export, search, edge, and import on top of an existing base. Options include specifying the profile and overwriting configurations. ```bash # Deploy ECS profile with 2 consortiums (3 tenants + 2 tenants) euroka-cli -p ecs deployApplication -oR # Access first consortium: http://localhost:3000 (user: ecs_admin, password: admin) # Contains: ecs (central), university (member), college (member) # Access second consortium: http://localhost:3001 (user: ecs_admin2, password: admin) # Contains: ecs2 (central), university2 (member) # Deploy single consortium version euroka-cli -p ecs-single deployApplication -oR # Deploy export application (data export with MinIO and FTP) euroka-cli -p export deployApplication # Deploy search application (Elasticsearch capabilities for Inventory) euroka-cli -p search deployApplication # Deploy edge application (Edge API modules with mod-okapi-facade) euroka-cli -p edge deployApplication # Deploy import application (data import functionality) euroka-cli -p import deployApplication -oR ``` -------------------------------- ### List Module Versions and Fetch Descriptors with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Lists available module versions in the registry or fetches a specific module descriptor by its version. This is useful for managing module dependencies and understanding specific deployments. ```bash eureka-cli listModuleVersions -m edge-orders ``` ```bash eureka-cli listModuleVersions -m edge-orders -i edge-orders-3.3.0-SNAPSHOT.88 ``` -------------------------------- ### List Module Versions with Eureka CLI Source: https://context7.com/folio-org/eureka-setup/llms.txt Queries available module versions from the registry and fetches module descriptors. Allows listing all available versions for a specific module or retrieving a particular module descriptor by its version. ```bash # List all available versions for a module euroka-cli listModuleVersions -m edge-orders # Get specific module descriptor by version euroka-cli listModuleVersions -m edge-orders -i edge-orders-3.3.0-SNAPSHOT.88 ``` -------------------------------- ### Deploy ECS Single Application with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Deploys an environment with a single consortium using the 'ecs-single' profile. This is suitable for resource-constrained environments and provisions three tenants with a single UI container. ```bash eureka-cli -p ecs-single deployApplication -oR ``` -------------------------------- ### Build System Docker Images with Eureka CLI Source: https://context7.com/folio-org/eureka-setup/llms.txt Builds Docker images for system containers independently from the main deployment process. Supports building from local repositories and incorporating Git updates. ```bash # Build from local repositories euroka-cli buildSystem # Build with Git updates euroka-cli buildSystem -u ``` -------------------------------- ### Deploy Local Backend Module with Custom Descriptor Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md This enables the deployment of backend modules using locally built Docker images and custom module descriptors. The `local-descriptor-path` configuration option is crucial for pointing to the descriptor file on the local filesystem, bypassing registry pulls. ```bash cd mvn clean package -DskipTests docker build --tag : . ``` ```yaml backend-modules: : version: "" local-descriptor-path: "/path/to/module/target/ModuleDescriptor.json" ``` ```bash eureka-cli deployApplication ``` -------------------------------- ### Deploy Local Frontend Module with Custom Descriptor Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md This allows for the deployment of frontend modules using local module descriptors. The `local-descriptor-path` key in the `frontend-modules` configuration section specifies the location of the descriptor file. ```yaml frontend-modules: folio_users: version: "" local-descriptor-path: "/path/to/ui-module/module-descriptor.json" ``` ```bash eureka-cli deployApplication ``` -------------------------------- ### Deploy Import Application with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Deploys the 'import' application, which contains modules for data-import functionality in FOLIO. This is a standalone application. ```bash eureka-cli -p import deployApplication -oR ``` -------------------------------- ### Deploy and Redeploy UI with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Commands to undeploy the existing UI container and then deploy a new one, typically after updating the UI image. This process ensures the latest UI version is running. ```bash eureka-cli undeployUi eureka-cli deployUi ``` -------------------------------- ### Build and Use Custom Folio Module Sidecar Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md This process involves cloning the folio-module-sidecar repository, building a custom Docker image locally, and configuring the Eureka CLI to use this custom image for deployments. The `sidecar-module.local-image` and `sidecar-module.version` keys are used in the configuration. ```bash git clone https://github.com/folio-org/folio-module-sidecar.git cd folio-module-sidecar mvn clean package -DskipTests docker build --tag custom-folio-module-sidecar:1.0.0 . ``` ```yaml sidecar-module: local-image: custom-folio-module-sidecar version: 1.0.0 ``` ```bash eureka-cli -p edge deployApplication eureka-cli -p edge listModules ``` -------------------------------- ### Use Custom Folio Module Sidecar (Bash) Source: https://context7.com/folio-org/eureka-setup/llms.txt Demonstrates how to deploy an environment with a custom-built Folio module sidecar image using eureka-cli. This involves cloning the sidecar repository, building the image locally, updating the configuration to use the local image, and then deploying the application. ```bash # Clone and build custom sidecar git clone https://github.com/folio-org/folio-module-sidecar.git cd folio-module-sidecar mvn clean package -DskipTests docker build --tag custom-folio-module-sidecar:1.0.0 . # Update config file to use local image # In config.combined.yaml or config.*.yaml: # sidecar-module: # local-image: custom-folio-module-sidecar # version: 1.0.0 # Deploy with custom sidecar euroka-cli -p edge deployApplication # Verify sidecar image version euroka-cli -p edge listModules ``` -------------------------------- ### Deploy Combined Application from AWS ECR with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Deploys the combined application using Docker images from AWS ECR. Requires setting AWS credentials and the ECR repository URL as environment variables. Supports explicit credential setting or reusing stored credentials. ```bash export AWS_ACCESS_KEY_ID= export AWS_SECRET_ACCESS_KEY= export AWS_ECR_FOLIO_REPO= euroka-cli deployApplication export AWS_ECR_FOLIO_REPO= AWS_SDK_LOAD_CONFIG=true eureka-cli deployApplication ``` -------------------------------- ### Deploy Local Frontend Module Descriptors with Eureka CLI Source: https://context7.com/folio-org/eureka-setup/llms.txt This snippet explains how to deploy applications using locally modified UI module descriptors with the eureka-cli. It requires configuring the `frontend-modules` section in the config file with the `local-descriptor-path`. Dependencies include eureka-cli. Inputs are the config file and the path to the local module descriptor. ```bash # Configure in config file: # frontend-modules: # folio_users: # version: "10.2.0" # local-descriptor-path: "/path/to/ui-users/module-descriptor.json" # Deploy with local frontend module descriptor euroka-cli deployApplication ``` -------------------------------- ### Login to Kong Gateway using curl (Admin User) Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md This snippet demonstrates how to obtain an access token from the Kong gateway using curl for an administrator user. It specifies the content type, target URL, and includes authentication details like username and password within the JSON payload. The `X-Okapi-Tenant` header is also crucial for specifying the tenant context. ```bash # Admin user: diku_admin curl --request POST \ --url http://localhost:8000/authn/login-with-expiry \ --header 'Content-Type: application/json' \ --header 'X-Okapi-Tenant: diku' \ --data '{"username":"diku_admin","password": "admin"}' \ --verbose ``` -------------------------------- ### Deploy ECS Application with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Deploys the ECS application, which is a standalone application. It deploys a UI container for each consortium and includes specific modules like mod-okapi-facade, mod-search, and elasticsearch. Supports overwriting files and using only required containers. ```bash eureka-cli -p ecs deployApplication -oR ``` -------------------------------- ### Login to Kong Gateway using curl (ECS Admin2 User) Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md This snippet demonstrates logging in the `ecs_admin2` user to the Kong gateway. It's a POST request to the authentication endpoint, setting the appropriate tenant and providing user credentials in the JSON payload. ```bash # Admin user: ecs_admin2 curl --request POST \ --url http://localhost:8000/authn/login-with-expiry \ --header 'Content-Type: application/json' \ --header 'X-Okapi-Tenant: ecs2' \ --data '{"username":"ecs_admin2","password": "user"}' \ --verbose ``` -------------------------------- ### List Deployed Modules with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Lists deployed modules, with options to filter by current profile, a specific module and its sidecar, only modules, only sidecars, management modules, or all modules across all profiles. ```bash eureka-cli listModules ``` ```bash eureka-cli listModules -m mod-orders ``` ```bash eureka-cli listModules -M module ``` ```bash eureka-cli listModules -M sidecar ``` ```bash eureka-cli listModules -M management ``` ```bash eureka-cli listModules -a ``` -------------------------------- ### Undeploy Applications with Eureka CLI Source: https://context7.com/folio-org/eureka-setup/llms.txt Removes deployed applications and cleans up associated Docker containers. Supports undeploying the main application, specific profiles like ECS, and individual child applications. ```bash # Undeploy main application euroka-cli undeployApplication # Undeploy specific profile euroka-cli -p ecs undeployApplication # Undeploy child applications euroka-cli -p export undeployApplication euroka-cli -p search undeployApplication euroka-cli -p edge undeployApplication ``` -------------------------------- ### Undeploy Import Application with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Undeploys the 'import' application, removing its associated modules and system containers. ```bash eureka-cli -p import undeployApplication ``` -------------------------------- ### Undeploy Combined Application with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Undeploys the combined application using the eureka-cli. This command is straightforward and does not require additional flags for basic undeployment. ```bash eureka-cli undeployApplication ``` -------------------------------- ### Deploy from AWS ECR (Bash) Source: https://context7.com/folio-org/eureka-setup/llms.txt Configures the deployment to use AWS Elastic Container Registry (ECR) as the container registry instead of DockerHub, using eureka-cli. This involves setting AWS credentials and the ECR repository URL as environment variables. ```bash # Set AWS credentials explicitly export AWS_ACCESS_KEY_ID= export AWS_SECRET_ACCESS_KEY= export AWS_ECR_FOLIO_REPO= euroka-cli deployApplication # Use stored AWS credentials from ~/.aws/config export AWS_ECR_FOLIO_REPO= AWS_SDK_LOAD_CONFIG=true eureka-cli deployApplication ``` -------------------------------- ### Undeploy ECS Single Application with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Undeploys the 'ecs-single' application profile, removing its associated tenants and UI container. ```bash eureka-cli -p ecs-single undeployApplication ``` -------------------------------- ### Undeploy ECS Application with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Undeploys the ECS application using the eureka-cli. This command specifically targets the ECS profile for undeployment. ```bash eureka-cli -p ecs undeployApplication ``` -------------------------------- ### Login to Kong Gateway using curl (ECS Admin User) Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md This command logs in an ECS admin user to the Kong gateway. It uses a POST request to the `/authn/login-with-expiry` endpoint, specifying the content type and tenant. The JSON data includes the username and password for authentication. ```bash # Admin user: ecs_admin curl --request POST \ --url http://localhost:8000/authn/login-with-expiry \ --header 'Content-Type: application/json' \ --header 'X-Okapi-Tenant: ecs' \ --data '{"username":"ecs_admin","password": "admin"}' \ --verbose ``` -------------------------------- ### Undeploy Child Applications with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Undeploys child applications, removing both their modules and system containers. This command can be used with a specific application configuration file or a profile flag, allowing for flexible undeployment of 'export', 'search', or 'edge' applications. ```bash eureka-cli -c ./config.{{app}}.yaml undeployApplication ``` ```bash eureka-cli -p {{profile}} undeployApplication ``` -------------------------------- ### Login to Backend via Kong Gateway (Curl) Source: https://context7.com/folio-org/eureka-setup/llms.txt Authenticates directly against the backend through the Kong API gateway using curl. This is used to obtain an access token for interacting with backend services. Supports login for different user roles and tenants. ```curl # Login as admin user (combined/import profiles) curl --request POST \ --url http://localhost:8000/authn/login-with-expiry \ --header 'Content-Type: application/json' \ --header 'X-Okapi-Tenant: diku' \ --data '{"username":"diku_admin","password":"admin"}' \ --verbose # Response includes access token in x-okapi-token header # x-okapi-token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9... # Login as limited user curl --request POST \ --url http://localhost:8000/authn/login-with-expiry \ --header 'Content-Type: application/json' \ --header 'X-Okapi-Tenant: diku' \ --data '{"username":"diku_user","password":"user"}' \ --verbose # Login to ECS consortium (ecs profile) curl --request POST \ --url http://localhost:8000/authn/login-with-expiry \ --header 'Content-Type: application/json' \ --header 'X-Okapi-Tenant: ecs' \ --data '{"username":"ecs_admin","password":"admin"}' \ --verbose # Login to second ECS consortium curl --request POST \ --url http://localhost:8000/authn/login-with-expiry \ --header 'Content-Type: application/json' \ --header 'X-Okapi-Tenant: ecs2' \ --data '{"username":"ecs_admin2","password":"user"}' \ --verbose ``` -------------------------------- ### Intercept Module with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md This command intercepts a specified module with a given version and assigns ports for its module and sidecar gateways. The `-r` flag can be used to restore the environment. ```bash eureka-cli interceptModule -i mod-orders:13.1.0-SNAPSHOT.1029 -g -m 36002 -s 37002 eureka-cli interceptModule -i mod-orders:13.1.0-SNAPSHOT.1029 -r ``` -------------------------------- ### Intercept Module Traffic (Bash) Source: https://context7.com/folio-org/eureka-setup/llms.txt Redirects module traffic from the Kong gateway to a local IntelliJ instance for debugging purposes using eureka-cli. It supports different methods for specifying target URLs and can restore the module to its environment defaults. The command outputs environment variables for IntelliJ configuration. ```bash # Intercept with full URLs euroka-cli interceptModule -i mod-orders:13.1.0-SNAPSHOT.1029 \ -m http://host.docker.internal:36002 \ -s http://host.docker.internal:37002 # Intercept with default gateway (automatic URL construction for Windows/MacOS) euroka-cli interceptModule -i mod-orders:13.1.0-SNAPSHOT.1029 \ -g -m 36002 -s 37002 # Intercept with default gateway (Linux uses http://172.17.0.1) # Or set application.gateway-hostname explicitly in config # Restore module and sidecar to environment defaults euroka-cli interceptModule -i mod-orders:13.1.0-SNAPSHOT.1029 -r # After interception, the CLI outputs environment variables # that can be embedded into IntelliJ Run/Debug Configuration: # OKAPI_HOST=localhost # OKAPI_PORT=37002 # OKAPI_URL=http://localhost:37002 # DB_HOST=postgres.eureka # DB_PORT=5432 # ... ``` -------------------------------- ### Check Module Port Accessibility with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Verifies if the internal ports of all modules and sidecars are accessible. The CLI also exposes port 5005 for remote debugging in IntelliJ. ```bash eureka-cli checkPorts ``` -------------------------------- ### Check Module Ports (Bash) Source: https://context7.com/folio-org/eureka-setup/llms.txt Verifies the accessibility of internal module ports using eureka-cli. This command helps in diagnosing network connectivity issues for modules and their sidecars. It outputs the status of each port. ```bash # Check all module ports euroka-cli checkPorts # Output shows port status for all modules and sidecars # Note: Internal port 5005 is exposed for remote debugging in IntelliJ ``` -------------------------------- ### Reindex Elasticsearch Indices with Eureka CLI Source: https://github.com/folio-org/eureka-setup/blob/master/eureka-cli/README.md Reindexes the inventory and instance record Elasticsearch indices. This command requires the 'mod-search' module and 'elasticsearch' system container to be deployed, or the use of specific profiles like 'search', 'ecs', or 'ecs-single'. ```bash eureka-cli -p {{profile}} reindexElasticsearch ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.