-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENDOC-525 Create new ent CLI Services page #541
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,59 @@ | ||
--- | ||
sidebarDepth: 1 | ||
--- | ||
|
||
# Auxiliary Services | ||
|
||
Auxiliary services add capabilities to a local environment to accelerate application development. This is in contrast to developing on Kubernetes, where the equivalent services are either provisioned by the Entando Platform or are externally managed and pointed to by the application. | ||
|
||
The following sections describe how Entando supports and implements auxiliary services. | ||
|
||
## Services | ||
|
||
When the Entando Bundle CLI enables a service, a default auxiliary configuration is generated and stored as a Docker Compose YAML file in the bundle's 'svc' folder. Three services are available out of the box: `mysql`, `postgresql` and `keycloak`. | ||
|
||
- `mysql` and `postgresql` obey the same naming convention | ||
- The username and password are derived from the bundle name, e.g. YOUR-BUNDLE has the username YOUR-BUNDLE-USER and the password YOUR-BUNDLE-PASSWORD | ||
- A database is automatically created and given the bundle name, e.g. YOUR-BUNDLE | ||
|
||
- `keycloak` configures authentication for Entando | ||
- The `keycloak` realm name is 'entando-dev' | ||
- The console is accessible at *http://localhost:9080* with username: *admin*, password: *admin* | ||
- All roles and permissions are preset, based on the Keycloak realm-config file | ||
- The `keycloak.yaml`, realm-config and user config files are located in the 'keycloak' folder inside 'svc' | ||
|
||
A custom service can be added to a bundle's 'svc' folder as a Docker Compose YAML file. The file and service must have the same name, e.g. if the service filename is `mysql.yml`, then the service name must be `mysql`: | ||
|
||
``` yaml | ||
version: '3.7' | ||
|
||
services: | ||
# since filename is mysql.yml, service name is 'mysql' as declared below: | ||
mysql: | ||
image: mysql | ||
... | ||
``` | ||
|
||
## Commands | ||
|
||
Use `ent bundle svc` to enable, disable, start, stop, restart, print the logs of, or list services. Services must be formatted as Docker Compose YAML files in the 'svc' bundle folder. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this seems unnecessary as it is listed all below There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. doesn't do any harm and introduces the |
||
|
||
To run auxiliary operations, a service must be enabled. Enabled services are listed under the 'svc' attribute of the bundle descriptor, `entando.json`. Common auxiliary service commands are detailed below. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure about 'auxiliary operations' here >> simplify >> a service must be enabled before it can be used There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the service performs auxiliary operations. the current wording is precise and connects the dots. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This explanation does help me connect it all. |
||
|
||
| Command | Description | ||
| :- | :- | ||
| `ent bundle svc enable <service_name>` | Adds the service(s) to the bundle’s auxiliary services | ||
| `ent bundle svc disable <service_name>` | Removes the service(s) from the bundle’s auxiliary services | ||
| `ent bundle svc start <service_name>` | Starts the enabled service(s) | ||
| `ent bundle svc stop <service_name>` | Stops the enabled service(s) | ||
| `ent bundle svc restart <service_name>` | Restarts the enabled service(s) | ||
| `ent bundle svc logs <service_name>` | Prints the enabled service log(s) | ||
| `ent bundle svc list` | Lists all enabled services | ||
|
||
**Command details:** | ||
|
||
- `svc logs`: The log of a running service will continue to update until exited via `Ctrl+C` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. until exited via There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. disagree we decided to backtick Ctrl+C a few months ago, and to use + instead of - There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. got the sign wrong, meant to do + . Pretty sure we just decided on Ctrl+C but the backtick is not a big deal. (4-5-22) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that decision doesn't make any mention of backticking, so i'm going off of how ctrl+c is usually formatted on the developer site. i have no strong feelings about this. just aiming for consistency. |
||
|
||
- `svc list`: Include the option `--available` to list all services located in the 'svc' bundle folder | ||
|
||
- Auxiliary commands can operate on multiple services by listing each service name as an argument, e.g. `ent bundle svc start service_1 service_2`. The option `--all` applies the command to all enabled bundle services. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a custom service can be added 'as' a Docker Compose... >> as sounds odd, maybe with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the service is the file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A Docker Compose file can contain multiple things. In this case it looks like Eng has a convention of 1 Docker Compose YAML File defining a single named service. So 'as' works for me.