Command-line Interface Reference
This page documents all available commands for lcp-compose. To get help from the command line simply call lcp-compose --help
combined with the command you would like to get more information on.
Core Args
The following options are available with every command:
- --work-dir: Set the working directory.
Commands
attach
Attach to the container that's running the specified service.
lcp-compose attach orders
build
Rebuild the docker image for the specified service. The service must be configured to be built from a Dockerfile for this command to make any effect.
lcp-compose build orders
Options
- --up: (Re)Start the service after building.
clean
Clean up the current working directory. This will delete the generated docker-compose file and configurations folder. The command will not remove the log directory any other files that may have been placed out of band in the working directory.
lcp-compose clean
Options
- --config: Removes the lcp-compose configuration file along with other files.
config
Pull configuration template files or folders from the each service's image and templatize with the current lcp-compose config. This task will shutdown the lcp-compose stack if it was running.
lcp-compose config
down
Stop and remove all managed services' containers.
lcp-compose down
Options
- --volumes: Remove named volumes defined by the current project as well.
exec
Execute a command in a running container of the specified service. Seperate the command string by --
lcp-compose exec orders -- fab reset_db
graph
Generate service graph (in dot format) based on the current service configuration.
lcp-compose graph
Options:
- --with-infrastructure: Include infrastructural services in the graph.
init
Initializes the lcp-compose working directory and the main configuration file, if it does not exist.
lcp-compose init
Options
- --force: If exists, remove existing configuration instead of updating.
- --log-dir: Set the logging directory for managed services, paths relative to working directory.
- --with-splunk: Set Splunk services as managed.
- --with-pluggable: Set all pluggable services as managed.
inspect
This will run docker inspect
command on the container ID of the specified service and print the JSON output.
lcp-compose inspect orders
logs
Tail the logs of running lcp-compose services.
lcp-compose logs
Options
- --service: Optional. Limit log output only from the specified service.
manage
Make lcp-compose manage a service. If invoked without arguments, the service will be reset to it's default docker image configuration.
lcp-compose manage security # docker image set to default
Only one of the configuration arguments --build-path
or --image-id
must be supplied.
lcp-compose manage security --build-path=../security/
lcp-compose manage security --image-id=dev-docker.points.com/security:43
Options
- --image-id: Docker image ID for the service, can be from any docker registry or a local image.
- --build-path: Path to a Dockerfile that the image for this service should be built.
ps
See the status of the running managed lcp-compose services.
lcp-compose ps
reload
Shutdown and reload the lcp-compose managed services from the configuration.
lcp-compose reload
restart
Restart the specified service container.
lcp-compose restart orders
sanity_test
Run sanity tests on the lcp-compose stack. By default, all tests in the lcp_compose.tests.sanity
package are run.
lcp-compose sanity_test
Options
- --test: Which test to run. Available options are file names under lcp_compose/tests/sanity.
search
Search for images to be used by lcp-compose.
lcp-compose search dev-docker.points.com/buy # search the tagged images for buy service in the dev registry
lcp-compose search rc-docker.points.com # search the catalog of the rc registry
lcp-compose search registry.points.com/dev/cirrus_probe --username=first.last --password API_TOKEN # gitlab
lcp-compose search registry.points.com/dev/cirrus_probe # You will be prompted for username/password
Options:
- --username In the case authorization is required, this will be used as the username to the auth service. If not provided, you will be prompted for it when it's needed.
- --password In the case authorization is required, this will be used as the password to the auth service. For Gitlab, this is going to be your API access token, not your AD password. Generate your access token here: https://gitlab.points.com/profile/personal_access_tokens If not provided, you will be prompted for it when it's needed.
services
Describe the current lcp-compose service configuration. The columns of the output are defined as follows.
- Service: Name of the service as identified by lcp-compose.
- Type: Type of the service. One of core, pluggable, or infrastructure.
- URL: Fully qualified URL including the protocol of the service.
- Docker Image: If managed service, the image URI or the build path of the service's container.
- Is Managed?: Managed status of this service.
Options
- --with-infrastructure: Display infrastructure services in the output as well.
shell
Open a shell on the container of the specified service.
lcp-compose shell orders
Options:
- --bin: Optional, path to the shell binary in the container.
unmanage
Make lcp-compose not manage a service. This command performs a soft disable. The URL and docker image config for the entry will be blanked and lcp-compose will simply not start any containers for this service.
lcp-compose unmanage
By providing extra arguments, the URL can be updated while keeping the service disabled. Any templates that require this service's URL will receive the configured URL instead of an empty string.
lcp-compose unmanage security --url=http://192.168.0.1:1401/
lcp-compose unmanage orders --url=http://orders-ft.lxc.points.com:1200/
Options
- --url: URL to be configured for the unmanaged service.
- --local-service-on-port: Convenience method to auto-generate a URL bound to a local IPv4 address of the docker host listening on the specified port number.
up
Refresh the configuration and start lcp-compose managed services.
lcp-compose up
Options
- --verify: Run sanity tests after the stack is up:
assets.render_template
Render a jinja2 template file using the current lcp-compose configuration.
lcp-compose assets.render_template --template=template.txt.j2 --destination=rendered.txt
Options
- --template: Path to the source template file.
- --destination: Path to store the templated version of the file.
bootstrap.create_accounts
None
bootstrap.create_permission_set
None
bootstrap.generate_test_config
Generate the configuration file used by integration tests
Options
- --save-to: The path to the configuration file where the configuration will be written to.
bootstrap.initialize_liblcp_context
None
NOTE: This documentation is auto-generated. See here for more information.