-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ondra Machacek <[email protected]>
- Loading branch information
1 parent
9d4cf52
commit 4c05b25
Showing
9 changed files
with
98 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Assited Migration service | ||
The Assited Migration service is responsible for receiving and serving the collected vCenter data to the user. Once the user creates a source for their vCenter environment, the Assited Migration service will provide a streaming service to download an OVA image. The OVA image can be booted on the vCenter enviroment to perform the collection of the vCenter data. | ||
|
||
## Assited migration API | ||
There are two APIs related to the assisted migration. | ||
|
||
### Internal API | ||
The internal API can be found [here](../api/v1alpha1/agent/openapi.yaml). | ||
|
||
The API contains operations to create a source, download the OVA image, etc. By default it runs on tcp port 3443. The API is not exposed externally to users, as it is only used internally by the UI. | ||
|
||
### External API | ||
The external API can be found [here](../api/v1alpha1/openapi.yaml). | ||
|
||
The API is exposed to communicate with the migration assessment VM. Its only operation is to update the status of the source. By default it runs on tcp port 7443. This API must be externally exposed so that the migration assessment VM can initiate communication. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Migration Assessment virtual machine | ||
The migration assessment virtual machine(VM), based on Red Hat CoreOS (RHCOS), communicates with the Assisted Migration service and reports its status. | ||
The VM is initialized using ignition, which configures multiple containers that run as systemd services. Each of these services is dedicated to a specific function. | ||
|
||
## Systemd services | ||
The following are a list of systemd services that can be found on migration assessment virtual machine. All of the services | ||
are defined as quadlets. Quadlet configuration can be found in the [ignition template file](../data/ignition.template). | ||
The migration assessment containerfile can be found [here](../Containerfile.agent). | ||
|
||
### migration-assessment | ||
`migration-assessment` is a service that reports the status to the assisted migration service. The URL of the assisted migration service is configured in the file `$HOME/.migration-assessment/config/config.yaml`, which is injected via ignition. | ||
|
||
The migration-assessment contains a web application that is exposed via tcp port 3333. Once the user accesses the web application and enters the credentials of their vCenter, the `credentials.json` file is created on the shared volume and the `collector` goroutine is spawned, which fetches the vCenter data. The data is stored in `$HOME/.migration-assessment/data/inventory.json`. Once `inventory.json` is created, the `migration-assessment` sends the data over to assisted migration service. | ||
|
||
### migration-assessment-opa | ||
migration-assessment-opa is a service that re-uses the [forklift validation](https://github.com/kubev2v/forklift/blob/main/validation/README.adoc) container. The forklift validation container is responsible for vCenter data validation. When the `migration-assessment` fetches vCenter data, it's validated against the OPA server and the report is shared back to the assisted migration service. | ||
|
||
### podman-auto-update | ||
Podman auto update is responsible for updating the image of the containers in case there is a new image release. The default `podman-auto-update.timer` is used, which executes `podman-auto-update` every 24 hours. | ||
|
||
## Troubleshooting Migration Assessment VM services | ||
Useful commands to troubleshoot the Migration Assessment VM. Note that all the containers are running under the `core` user. | ||
|
||
### Listing the running podman containers | ||
``` | ||
$ podman ps | ||
``` | ||
|
||
### Checking the status of migration-assessment service | ||
``` | ||
$ systemctl --user status migration-assessment | ||
``` | ||
|
||
### Inspecting the host directory with data | ||
When the virtual machine boots, ignition creates the `.migration-assesment` directory in the `core` user's home directory. | ||
This directory contains two subdirectories: `data` and `config`. | ||
The `data` directory contains a `credentials.json` file, which is created when the user enters their vCenter credentials. | ||
It also contains an `inventory.json` file, which is created by the `migration-assesment` service when vCenter data is fetched. | ||
The `config` directory contains a `config.yaml` file, which is created by ignition and contains configuration for the | ||
`migration-assesment` service. | ||
|
||
To explore the data and configuration created and used by `migration-assesment`: | ||
``` | ||
$ ls -l /home/core/.migration-assesment/data | ||
$ cat /home/core/.migration-assesment/config/config.yaml | ||
``` | ||
|
||
### Check logs of the services | ||
``` | ||
$ journalctl --user -f -u migration-assesment | ||
``` | ||
|
||
### Status is `Not connected` after VM is booted. | ||
This usually indicates that the `migration-assesment` service can't communicate with the assisted migration service. | ||
Check the logs of the `migration-assesment` service: | ||
``` | ||
journalctl --user -f -u migration-assesment | ||
``` | ||
And search for the error in the log: | ||
``` | ||
level=error msg="failed connecting to assisted migration: dial tcp: http://non-working-ip:7443 | ||
``` | ||
Make sure `non-working-ip` has a properly setup assisted migration service and is listening on port `7443`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters