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

Rename the VM and services #64

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# migration-planner
Plan migrations to OpenShift Virtualization
# Assisted migration
Plan migrations to OpenShift Virtualization from VMware.
2 changes: 1 addition & 1 deletion data/AgentVM.ovf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</NetworkSection>
<VirtualSystem ovf:id="AgentVM">
<Info>A Virtual system</Info>
<Name>AgentVM</Name>
<Name>MigrationAssessment</Name>
<OperatingSystemSection ovf:id="80" ovf:version="8" vmw:osType="rhel9_64Guest">
<Info>The operating system installed</Info>
<Description>Other Linux (64-bit)</Description>
Expand Down
11 changes: 0 additions & 11 deletions doc/agentservice.md

This file was deleted.

11 changes: 11 additions & 0 deletions doc/assistedmigration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Assisted Migration service
The Assisted 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 Assisted 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.

## Assisted Migration API
There are two APIs related to the Assisted Migration.

### Internal API
The internal 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 extenral 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.
12 changes: 6 additions & 6 deletions doc/deployment.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Deployment of the Agent service on OpenShift
The project contains yaml files for deploying the Agent service on OpenShift. This document describes the deployment process.
# Deployment of the Assisted Migration service on OpenShift
The project contains yaml files for deploying the Assisted Migration service on OpenShift. This document describes the deployment process.
By default images are deployed from the `quay.io/kubev2v` namespace. New images are built and pushed to quay after each PR is merged in this repo.

## Deploy on OpenShift
In order to deploy the Agent service on top of OpenShift there is Makefile target called `deploy-on-openshift`.
In order to deploy the Assisted Migration service on top of OpenShift there is Makefile target called `deploy-on-openshift`.

```
$ oc login --token=$TOKEN --server=$SERVER
Expand All @@ -18,7 +18,7 @@ To undeploy the project, which removes all the relevent parts, run:
make undeploy-on-openshift
```

## Using custom images for the Agent Service API and UI
## Using custom images for the Assisted Migration Service API and UI
If you want to deploy the project with your own images you can specify custom enviroment variables:

```
Expand All @@ -27,8 +27,8 @@ export MIGRATION_PLANNER_UI_IMAGE=quay.io/$USER/migration-planner-ui
make deploy-on-openshift
```

## Using custom Agent Images used in the Agent OVA
Agent images are defined in the ignition file. In order to modify the images of the Agent you need to pass the specific environment variables to the deployment of the API service. Modify `deploy/k8s/migration-planner.yaml` and add relevant environment variables to the deployment manifest. For example:
## Using custom container images used in the Migration Asessment VM
Container images are defined in the ignition file. In order to modify the container images you need to pass the specific environment variables to the deployment of the Assisted Migration service. Modify `deploy/k8s/migration-planner.yaml` and add relevant environment variables to the deployment manifest. For example:

```
env:
Expand Down
24 changes: 12 additions & 12 deletions doc/agentvm.md → doc/migrationassessmentvm.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# Agent virtual machine
The agent virtual machine, based on Red Hat CoreOS (RHCOS), communicates with the Agent 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.
# 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 Migration Assessment 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 agent virtual machines. All of the services
The following are a list of systemd services that can be found on Migration Assessment virtual machines. All of the services
are defined as quadlets. Quadlet configuration can be found in the [ignition template file](../data/ignition.template).
The Agent containerfile can be found [here](../Containerfile.agent).
The `planner-agent` containerfile can be found [here](../Containerfile.agent).

### planner-agent
Planner-agent is a service that reports the status to the Agent service. The URL of the Agent service is configured in the file `$HOME/.migration-planner/config/config.yaml`, which is injected via ignition.
Planner-agent 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-planner/config/config.yaml`, which is injected via ignition.

The Planner-agent 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-planner/data/inventory.json`. Once `inventory.json` is created, the `planner-agent` service sends the data over to Agent service.
The `planner-agent` 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-planner/data/inventory.json`. Once `inventory.json` is created, the `planner-agent` service sends the data over to Assisted Migration service.

### planner-agent-opa
Planner-agent-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 `planner-agent-collector` fetches vCenter data, it's validated against the OPA server and the report is shared back to the Agent Service.
Planner-agent-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 `planner-agent-collector` 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 Agent VM services
Useful commands to troubleshoot the Agent VM. Note that all the containers are running under the `core` user.
## 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
```
Expand Down Expand Up @@ -51,7 +51,7 @@ $ journalctl --user -f -u planner-agent
```

### Status is `Not connected` after VM is booted.
This usually indicates that the `planner-agent` service can't communicate with the Agent service.
This usually indicates that the `planner-agent` service can't communicate with the Assisted Migration service.
Check the logs of the `planner-agent` service:
```
journalctl --user -f -u planner-agent
Expand All @@ -60,4 +60,4 @@ And search for the error in the log:
```
level=error msg="failed connecting to migration planner: dial tcp: http://non-working-ip:7443
```
Make sure `non-working-ip` has a properly setup Agent service and is listening on port `7443`.
Make sure `non-working-ip` has a properly setup Assisted Migration service and is listening on port `7443`.
Loading