Skip to content
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-513 new bundle cli page #542

Merged
merged 5 commits into from
Aug 2, 2022
Merged

ENDOC-513 new bundle cli page #542

merged 5 commits into from
Aug 2, 2022

Conversation

jyunmitch
Copy link
Collaborator

@nshaw Lines 89 & 115 included information that I wasn't sure was useful, with "**". Let me know your thoughts.

Also @nshaw & @Lyd1aCla1r3, is line 18, first sentence, kind of weird. It's starting to sound weird to me

@jyunmitch jyunmitch requested review from Lyd1aCla1r3 and nshaw July 28, 2022 21:02
vuepress/docs/next/docs/getting-started/ent-bundle.md Outdated Show resolved Hide resolved
vuepress/docs/next/docs/getting-started/ent-bundle.md Outdated Show resolved Hide resolved
docker tag YOUR-ORG-NAME/YOUR-IMAGE-NAME:tag YOUR-REGISTRY/YOUR-ORG-NAME/YOUR-IMAGE-NAME:tag
```

** 3. is this useful to include >>>>>> The path to the config file is mapped by the environment variable ENTANDO_CLI_DOCKER_CONFIG_PATH.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, maybe so, as a side note.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this is internal, user should not modify this value.

vuepress/docs/next/docs/getting-started/ent-bundle.md Outdated Show resolved Hide resolved
|ent bundle publish --registry [registry]| Publish the Docker images to your Docker registry|

#### Command Details
* `ent bundle publish --org`: If the organization name has changed, the Docker tag command can be used to create new image tags for the new name to be stored in .entando/config.json.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused. The extra comment should maybe be on its own line. What I think is being said is, if the org name changed since you ran the pack command and created the images, here's what to do. If that's true, this is an edge case and should be just a side note, not the first thing seen.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. this is not a central issue with the command. So rearranged and edited a bit to clarify

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @nshaw comment. The fact that we check if the organization name has changed and we then use docker tag command is an internal implementation detail. The flag simply allows to specify the Docker organization you want to use in the publish command. By default the organization is the same you provided in the ent bundle pack command, using the --org flag you can override that with a new value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. I think it makes most sense to remove the details altogether.

vuepress/docs/next/docs/getting-started/ent-bundle.md Outdated Show resolved Hide resolved
@Lyd1aCla1r3
Copy link
Contributor

line 18 sounds good to me!

everything i write ends up looking weird to me. then i convince myself it doesn't. then other people agree it does. and by then i'm confused...

Copy link
Contributor

@Lyd1aCla1r3 Lyd1aCla1r3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jax and i worked on this together so i'm hoping neurons didn't have too many detours

vuepress/docs/next/docs/getting-started/ent-bundle.md Outdated Show resolved Hide resolved
# Bundle Management - ent bundle CLI
The Entando bundle CLI extends the functionality of **ent** with a modular bundle management system. Starting with Entando 7.1, ent bundle orchestrates the lifecycle of a project, whether it comes with a single component or many, and packages them into convenient recognizable bundles that can be inserted into any Entando Application. This modular approach takes advantage of a single project descriptor and repository, along with centralized [management of APIs](ent-api.md) and [services for DB and Keycloak](ent-svc.md).

This document covers ent bundle operations and how it manages the lifecycle of a bundle, organized by the steps required.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backticks for ent bundle

can rephrase so doesn't read like "it" references "operations"?

"organized by the steps required" sounds very odd...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edited some

vuepress/docs/next/docs/getting-started/ent-bundle.md Outdated Show resolved Hide resolved
### Bundle Lifecycle Overview
A single JSON descriptor file can define the parameters of an Entando project, but the life of an Entando Bundle begins at initialization. The ent init step sets up the structure and scaffolding needed for a new bundle. This tool allows a project to be intialized directly from the Entando Hub, speeding up the development process. The second step builds the project components for the micro frontends (MFE) and microservices (MS), whether you have a single component or many MSs and MFEs. They are built in parallel, using processes that are dependent on your stack, and given version numbers filtered by type and name.

The next step runs the components, processed in the same way by type and name, resulting in log files for each. The ent pack step generates the artifacts and builds the Docker images. A single Docker image is built for the bundle and all its microservices. Then Docker images are built for each micro frontend. Finally, these images are published to a Docker repository.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first sentence -> "The next step processes the components by type and name, resulting..."

backtick ent pack

would change "then" to "next," to make the two sentences more fluid

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't take out the word run because that is the related command

you would have "next twice," which sounds bad.

For these multiple comments, if you would copy and paste the referenced text, that would be great. I end up spending a lot of time looking for what it is you're writing about

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i thought they could be found easily but will try to make explicit

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refer to line or sentence, or something like that is fine

vuepress/docs/next/docs/getting-started/ent-bundle.md Outdated Show resolved Hide resolved
vuepress/docs/next/docs/getting-started/ent-bundle.md Outdated Show resolved Hide resolved
vuepress/docs/next/docs/getting-started/ent-bundle.md Outdated Show resolved Hide resolved
vuepress/docs/next/docs/getting-started/ent-bundle.md Outdated Show resolved Hide resolved
vuepress/docs/next/docs/getting-started/ent-bundle.md Outdated Show resolved Hide resolved
### Bundle Lifecycle Overview
A single JSON descriptor file can define the parameters of an Entando project, but the life of an Entando Bundle begins at initialization. The ent init step sets up the structure and scaffolding needed for a new bundle. This tool allows a project to be intialized directly from the Entando Hub, speeding up the development process. The second step builds the project components for the micro frontends (MFE) and microservices (MS), whether you have a single component or many MSs and MFEs. They are built in parallel, using processes that are dependent on your stack, and given version numbers filtered by type and name.

The next step runs the components, processed in the same way by type and name, resulting in log files for each. The ent pack step generates the artifacts and builds the Docker images. A single Docker image is built for the bundle and all its microservices. Then Docker images are built for each micro frontend. Finally, these images are published to a Docker repository.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sentence about Docker images is not correct. We build:

  • one Docker image for the bundle (that contains also MFEs files)
  • one Docker image for each microservice.

|`ent bundle run --all-mfe`| Locally run the MFEs in the bundle

#### Command Details
`ent bundle run`: Executes processes dependent on the component type and stack. For example, MVN spring:boot will execute for a Sping Boot microservice. All the components in the bundle will run in parallel, with a log file generated for each inside the .entando/logs directory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mvn spring-boot:run is the correct command. mvn lowercase.

|ent bundle publish --registry [registry]| Publish the Docker images to your Docker registry|

#### Command Details
* `ent bundle publish --org`: If the organization name has changed, the Docker tag command can be used to create new image tags for the new name to be stored in .entando/config.json.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @nshaw comment. The fact that we check if the organization name has changed and we then use docker tag command is an internal implementation detail. The flag simply allows to specify the Docker organization you want to use in the publish command. By default the organization is the same you provided in the ent bundle pack command, using the --org flag you can override that with a new value.

#### Command Details
* `ent bundle publish --org`: If the organization name has changed, the Docker tag command can be used to create new image tags for the new name to be stored in .entando/config.json.

docker tag OLD-ORG-NAME/YOUR-IMAGE:tag NEW-ORG-NAME/YOUR-IMAGE:tag
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the command run internally by the tool. The user should not be aware of this.

* `ent bundle publish --registry`
1. A specific Docker registry can be used but it must be authenticated by using the --config flag on the login command.
```
docker --config path/to/.docker login YOUR-REGISTRY
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an internal implementation detail, the user should never execute docker command by himself/herself. ent bundle executes this commands internally.

```
docker --config path/to/.docker login YOUR-REGISTRY
```
This is how the authentication context used by ent is kept separated from the default authentication context for the user. Credentials will be stored unencrypted in `path/to/.docker/config.json` unless a credentials helper is used.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this is not relevant for the user. They should not be aware of this.


2. If you are using a custom registry, images need to be renamed, prepending the custom registry name to the image names using this Docker command:
```
docker tag YOUR-ORG-NAME/YOUR-IMAGE-NAME:tag YOUR-REGISTRY/YOUR-ORG-NAME/YOUR-IMAGE-NAME:tag
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this is an internal command. User doesn't need neither to call this, nor to be aware of it.

docker tag YOUR-ORG-NAME/YOUR-IMAGE-NAME:tag YOUR-REGISTRY/YOUR-ORG-NAME/YOUR-IMAGE-NAME:tag
```

** 3. is this useful to include >>>>>> The path to the config file is mapped by the environment variable ENTANDO_CLI_DOCKER_CONFIG_PATH.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this is internal, user should not modify this value.


| Command| Descriptions
|:--|:--
|`ent ecr list`| Display the list of bundles associated with the current profile|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this page is now the primary reference for the ent ecr command, I think we need to add in more of the subcommands, Unfortunately there's duplication with the ent prj command but we at least need install, install --conflict-strategy=OVERRIDE, uninstall, generate-cr, and maybe also gen-secret

|`ent ecr list`| Display the list of bundles associated with the current profile|
|`ent ecr deploy`| Generate the CR and deploy it to the current profile |
|`ent ecr deploy`| Generate the custom resource (CR) and deploy it to the current profile |
|`ent ecr gen-secret`| Generate and display a plugin secret skeleton|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Secret

|`ent ecr get-bundle-id [repository-url]` | Calculate and display the bundle ID
|`ent ecr get-plugin-id --auto [repository-url]` | Calculate and display the plugin ID

|`ent ecr install`| Install a bundle to the ECR|
|`ent ecr install --conflict-strategy=OVERRIDE`|Adopt a strategy for conflicts on installed bundles|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on -> with


#### Command Details
* `get-bundle-id` and `get-plugin-id`: Entando uses a unique identifier for your bundle as a way to provide customization parameters and add security controls for bundle-specific resources. A unique identifier is also generated for each microservice plugin in your project.
* `ent ecr get-bundle-id` and `ent ecr get-plugin-id`: Entando uses a unique identifier for your bundle as a way to provide customization parameters and add security controls for bundle-specific resources. A unique identifier is also generated for each microservice plugin in your project.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor but identifiers apply to all bundles/plugins, not just yours / the user's

* `get-bundle-id` and `get-plugin-id`: Entando uses a unique identifier for your bundle as a way to provide customization parameters and add security controls for bundle-specific resources. A unique identifier is also generated for each microservice plugin in your project.
* `ent ecr get-bundle-id` and `ent ecr get-plugin-id`: Entando uses a unique identifier for your bundle as a way to provide customization parameters and add security controls for bundle-specific resources. A unique identifier is also generated for each microservice plugin in your project.

* `ent ecr install --conflict-strategy=OVERRIDE`: If a project bundle has already been installed, the `--conflict-strategy` flag forces a `CREATE`, `SKIP`, or `OVERRIDE` strategy for components.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flag -> option

|`ent bundler from-git`|Generate a custom resource for publication or exporting from a Git repository|
|`ent bundler from-env`|Generate a custom resource from an existing environment for the current or selected location|
|`ent prj install`| Install the bundle into Entando|
|`ent prj install --conflict-strategy=OVERRIDE`|Adopt a strategy for conflicts on installed bundles
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conflicts with

@jyunmitch jyunmitch merged commit f93fdd6 into ENDOC-522 Aug 2, 2022
@jyunmitch jyunmitch deleted the ENDOC-513 branch August 2, 2022 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants