### Start Minikube Cluster Source: https://move2kube.konveyor.io/tutorials/migrating-from-docker-compose-to-kubernetes Initializes a local Kubernetes cluster using the Docker driver. ```bash $ minikube start πŸ˜„ minikube v1.24.0 on Darwin 12.0.1 ✨ Using the docker driver based on existing profile πŸ‘ Starting control plane node minikube in cluster minikube 🚜 Pulling base image ... πŸƒ Updating the running docker "minikube" container ... 🐳 Preparing Kubernetes v1.22.3 on Docker 20.10.8 ... πŸ”Ž Verifying Kubernetes components... β–ͺ Using image gcr.io/k8s-minikube/storage-provisioner:v5 πŸ’‘ After the addon is enabled, please run "minikube tunnel" and your ingress resources would be available at "127.0.0.1" β–ͺ Using image registry.k8s.io/ingress-nginx/controller:v1.0.4 β–ͺ Using image registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.1.1 β–ͺ Using image registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.1.1 πŸ”Ž Verifying ingress addon... 🌟 Enabled addons: storage-provisioner, default-storageclass, ingress πŸ„ Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default ``` -------------------------------- ### Start the Move2Kube API Server Source: https://move2kube.konveyor.io/tutorials/api Initialize the API server using either Docker or a local binary. ```bash $ docker run --rm -it -p 8080:8080 quay.io/konveyor/move2kube-api ``` ```bash $ ./move2kube-api ``` -------------------------------- ### Example m2kconfig.yaml content Source: https://move2kube.konveyor.io/tutorials/running-non-interactively A sample configuration file showing the structure of stored answers. ```yaml # click to see the full yaml move2kube: containerruntime: docker ....... ``` ```yaml move2kube: containerruntime: docker minreplicas: "2" services: golang: "8080": urlpath: /golang enable: true ports: - "8080" java-gradle: "9080": urlpath: /java-gradle enable: true wartransformer: Liberty java-maven: "9080": urlpath: /java-maven enable: true wartransformer: Liberty myproject-django: "8080": urlpath: /myproject-django enable: true port: "8080" myproject-java-war: "9080": urlpath: /myproject-java-war enable: true wartransformer: Liberty myproject-php: "8082": urlpath: /myproject-php enable: true myproject-python: "8080": urlpath: /myproject-python enable: true port: "8080" nodejs: "8080": urlpath: /nodejs enable: true port: "8080" ruby: "8080": urlpath: /ruby enable: true port: "8080" rust: "8085": urlpath: /rust enable: true port: "8085" target: clustertype: Kubernetes imageregistry: logintype: No authentication namespace: myproject url: quay.io ingress: host: myproject.com tls: "" transformers: types: - EarRouter - WinConsoleApp-Dockerfile - Gradle - Jar - WinSLWebApp-Dockerfile - DockerfileImageBuildScript - DotNetCore-Dockerfile - EarAnalyser - Golang-Dockerfile - Ruby-Dockerfile - Tomcat - Buildconfig - ComposeGenerator - ContainerImagesPushScriptGenerator - DockerfileParser - WarAnalyser - WinWebApp-Dockerfile - WarRouter - ZuulAnalyser - KubernetesVersionChanger - Tekton - Maven - PHP-Dockerfile - Parameterizer - Python-Dockerfile - ClusterSelector - DockerfileDetector - Kubernetes - Liberty - Rust-Dockerfile - Nodejs-Dockerfile - ReadMeGenerator - CloudFoundry - ComposeAnalyser - Jboss - Knative transformerselector: "" ``` -------------------------------- ### Run Move2Kube UI with Podman Source: https://move2kube.konveyor.io/installation/ui Starts the Move2Kube UI container using Podman. ```bash $ podman run --rm -it -p 8080:8080 quay.io/konveyor/move2kube-ui:v0.3.0 ``` -------------------------------- ### Move2Kube Transformation Output Example Source: https://move2kube.konveyor.io/ Shows the terminal output during the download and transformation process. ```text 199.110.133, 185.199.111.133, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 295 [text/plain] Saving to: β€˜samples/docker-compose/docker-compose.yaml’ docker-compose.yaml 0%[ docker-compose.yaml 100%[=====================================================================================================================================================>] 295 --.-KB/s in 0s 2021-12-07 17:50:01 (9.08 MB/s) - β€˜samples/docker-compose/docker-compose.yaml’ saved [295/295] bash-5.1$ cd samples/ bash-5.1$ ls docker-compose bash-5.1$ move2kube transform -s docker-compose/ ``` -------------------------------- ### Example Configuration Mapping Source: https://move2kube.konveyor.io/tutorials/running-non-interactively Shows how to structure the configuration file to map service port URL paths to specific values. ```yaml move2kube: services: java-maven: "9080": urlpath: /java-maven ``` -------------------------------- ### Install Move2Kube via shell script Source: https://move2kube.konveyor.io/installation/cli Use the installation script to download and install the latest stable version of Move2Kube. ```bash bash <(curl https://raw.githubusercontent.com/konveyor/move2kube/main/scripts/install.sh) ``` ```bash MOVE2KUBE_TAG='v0.3.0-beta.0' bash <(curl https://raw.githubusercontent.com/konveyor/move2kube/main/scripts/install.sh) ``` ```bash BLEEDING_EDGE='true' bash <(curl https://raw.githubusercontent.com/konveyor/move2kube/main/scripts/install.sh) ``` ```bash USE_SUDO=false bash <(curl https://raw.githubusercontent.com/konveyor/move2kube/main/scripts/install.sh) ``` ```bash MOVE2KUBE_INSTALL_DIR=/my/new/install/dir bash <(curl https://raw.githubusercontent.com/konveyor/move2kube/main/scripts/install.sh) ``` ```bash USE_SUDO=false MOVE2KUBE_INSTALL_DIR=/my/new/install/dir bash <(curl https://raw.githubusercontent.com/konveyor/move2kube/main/scripts/install.sh) ``` -------------------------------- ### Start Move2Kube UI with persistence and advanced features Source: https://move2kube.konveyor.io/tutorials/ui Runs the UI container with volume mounts for data persistence and Docker socket access for advanced transformation features. ```bash # Optionally if you need persistence then mount the current directory: $ docker run --rm -it -p 8080:8080 -v "${PWD}/move2kube-api-data:/move2kube-api/data" quay.io/konveyor/move2kube-ui:latest # And if you also need more advanced features of Move2Kube then mount the docker socket. This will allow Move2Kube to run container based transformers: $ docker run --rm -it -p 8080:8080 -v "${PWD}/move2kube-api-data:/move2kube-api/data" -v //var/run/docker.sock:/var/run/docker.sock quay.io/konveyormove2kube-ui:latest ``` -------------------------------- ### Enable Minikube Ingress Source: https://move2kube.konveyor.io/tutorials/migration-workflow/transform Configure the Minikube ingress addon and start the tunnel to expose services locally. ```bash $ minikube addons enable ingress πŸ’‘ After the addon is enabled, please run "minikube tunnel" and your ingress resources would be available at "127.0.0.1" β–ͺ Using image registry.k8s.io/ingress-nginx/controller:v1.0.4 β–ͺ Using image registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.1.1 β–ͺ Using image registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.1.1 πŸ”Ž Verifying ingress addon... 🌟 The 'ingress' addon is enabled $ minikube addons enable ingress-dns πŸ’‘ After the addon is enabled, please run "minikube tunnel" and your ingress resources would be available at "127.0.0.1" β–ͺ Using image gcr.io/k8s-minikube/minikube-ingress-dns:0.0.2 🌟 The 'ingress-dns' addon is enabled $ minikube tunnel ❗ The service/ingress myproject requires privileged ports to be exposed: [80 443] πŸ”‘ sudo permission will be asked for it. πŸƒ Starting tunnel for service myproject. Password: ``` -------------------------------- ### Example Docker Compose File Source: https://move2kube.konveyor.io/tutorials/move2kube-collect A sample docker-compose.yml file used as a source for metadata collection. ```yaml version: "3" services: web: image: nginx:stable-alpine entrypoint: [ "sh", "-c", 'cd /usr/share/nginx/html/ && mkdir web && cp * web/ ; nginx -g "daemon off;"', ] ports: - "8080:80" ``` -------------------------------- ### Run Move2Kube UI with Docker Source: https://move2kube.konveyor.io/installation/ui Starts the Move2Kube UI container using Docker with default settings. ```bash $ docker run --rm -it -p 8080:8080 quay.io/konveyor/move2kube-ui:v0.3.0 ``` -------------------------------- ### Define a deployment parameterizer Source: https://move2kube.konveyor.io/transformers/purpose-built/parameterizer Example configuration for a parameterizer targeting deployment replicas and container images. ```yaml apiVersion: move2kube.konveyor.io/v1alpha1 kind: Parameterizer metadata: name: deployment-parameterizers spec: parameterizers: - target: "spec.replicas" template: "${common.replicas}" default: 10 filters: - kind: Deployment apiVersion: ".*/v1.*" Now the `values.yaml` looks like this - target: 'spec.template.spec.containers.[containerName:name].image' template: '${imageregistry.url}/${imageregistry.namespace}/${services.$(metadataName).containers.$(containerName).image.name}:${services.$(metadataName).containers.$(containerName).image.tag}' default: quay.io/konveyor/myimage:latest filters: - kind: Deployment apiVersion: ".*/v1.*" parameters: - name: services.$(metadataName).containers.$(containerName).image.name values: - envs: [dev, staging, prod] metadataName: frontend value: frontend - envs: [prod] metadataName: orders value: orders custom: containerName: orders ``` -------------------------------- ### Start Move2Kube UI Server Source: https://move2kube.konveyor.io/tutorials/migration-workflow/plan Command to launch the Move2Kube API server in a Docker container for UI-based interaction. ```bash $ docker run --rm -it -p 8080:8080 quay.io/konveyor/move2kube-ui:v0.3.1 INFO[0000] Starting Move2Kube API server at port: 8080 ``` -------------------------------- ### Move2Kube CLI Execution Log Source: https://move2kube.konveyor.io/concepts/git-support Example output showing the interactive configuration process and planning phase when using a Git source. ```text INFO[0000] Cloning the repository using git into /var/folders/65/8blqnjn175s37p_k6s2n50nm0000gq/T/move2kube2368627818/m2ksources. This might take some time. ? Specify a Kubernetes style selector to select only the transformers that you want to run. ID: move2kube.transformerselector Hints: - Leave empty to select everything. This is the default. ? Select all transformer types that you are interested in: ID: move2kube.transformers.types Hints: - Services that don't support any of the transformer types you are interested in will be ignored. ArgoCD, Buildconfig, CNBContainerizer, CloudFoundry, ClusterSelector, ComposeAnalyser, ComposeGenerator, ContainerImagesPushScriptGenerator, DockerfileDetector, DockerfileImageBuildScript, DockerfileParser, DotNetCore-Dockerfile, EarAnalyser, EarRouter, Golang-Dockerfile, Gradle, Jar, Jboss, Knative, Kubernetes, KubernetesVersionChanger, Liberty, Maven, Nodejs-Dockerfile, OperatorTransformer, OperatorsFromTCA, PHP-Dockerfile, Parameterizer, Python-Dockerfile, ReadMeGenerator, Ruby-Dockerfile, Rust-Dockerfile, Tekton, Tomcat, WarAnalyser, WarRouter, WinWebApp-Dockerfile, ZuulAnalyser ? Allow spawning containers? ID: move2kube.spawncontainers Hints: - If this setting is set to false, those transformers that rely on containers will not work. No INFO[0005] Configuration loading done INFO[0005] Start planning INFO[0005] Planning started on the base directory: '/var/folders/65/8blqnjn175s37p_k6s2n50nm0000gq/T/move2kube2368627818/m2ksources/konveyor/move2kube-demos.git/samples/kubernetes-to-kubernetes' INFO[0005] [CloudFoundry] Planning INFO[0005] [CloudFoundry] Done INFO[0005] [ComposeAnalyser] Planning INFO[0005] [ComposeAnalyser] Done INFO[0005] [DockerfileDetector] Planning INFO[0006] [DockerfileDetector] Done INFO[0006] [Base Directory] Identified 0 named services and 0 to-be-named services INFO[0006] Planning finished on the base directory: '/var/folders/65/8blqnjn175s37p_k6s2n50nm0000gq/T/move2kube2368627818/m2ksources/konveyor/move2kube-demos.git/samples/kubernetes-to-kubernetes' INFO[0006] Planning started on its sub directories INFO[0006] Identified 1 named services and 0 to-be-named services in . INFO[0006] Identified 1 named services and 0 to-be-named services in . INFO[0006] Planning finished on its sub directories INFO[0006] [Directory Walk] Identified 1 named services and 1 to-be-named services INFO[0006] [Named Services] Identified 1 named services INFO[0006] Planning done. Number of services identified: 1 INFO[0006] Starting transformation ? Select all services that are needed: ID: move2kube.services.[].enable Hints: - The services unselected here will be ignored. move2kube-demos INFO[0006] Found multiple transformation options for the service 'move2kube-demos'. Selecting the first valid option. INFO[0006] Using the transformation option 'KubernetesVersionChanger' for the service 'move2kube-demos'. INFO[0006] Iteration 1 INFO[0006] Iteration 2 - 1 artifacts to process INFO[0006] Transformer 'ClusterSelector' processing 1 artifacts ? Choose the cluster type: ID: move2kube.target."default".clustertype Hints: - Choose the cluster type you would like to target Kubernetes INFO[0006] Transformer ClusterSelector Done INFO[0006] Transformer 'KubernetesVersionChanger' processing 1 artifacts INFO[0006] Transformer KubernetesVersionChanger Done INFO[0006] Created 1 pathMappings and 1 artifacts. Total Path Mappings : 1. Total Artifacts : 1. INFO[0006] Iteration 3 - 1 artifacts to process INFO[0006] Transformer 'Parameterizer' processing 1 artifacts INFO[0006] Transformer Parameterizer Done INFO[0006] Transformation done INFO[0006] Transformed target artifacts can be found at [/Users/user/Desktop/tutorial/myproject]. ``` -------------------------------- ### Download Kubernetes-to-Kubernetes Sample Source: https://move2kube.konveyor.io/tutorials/customize-cluster-selector Downloads the sample project and lists the contents of the directory. ```bash $ curl https://move2kube.konveyor.io/scripts/download.sh | bash -s -- -d samples/kubernetes-to-kubernetes -r move2kube-demos $ ls kubernetes-to-kubernetes/ api-deployment.yaml api-service.yaml redis-deployment.yaml redis-service.yaml web-deployment.yaml web-ingress.yaml web-service.yaml ``` -------------------------------- ### Download Sample Configuration Source: https://move2kube.konveyor.io/tutorials/qa-categorization Fetch a sample docker-compose file for testing Move2Kube transformations. ```bash $ wget -P samples/docker-compose/ https://raw.githubusercontent.com/konveyor/move2kube-demos/main/samples/docker-compose/single-service/docker-compose.yaml ``` -------------------------------- ### Install Move2Kube CLI Source: https://move2kube.konveyor.io/tutorials/collect-selected-cf-apps Use this script to install a specific version of the Move2Kube CLI. ```bash $ MOVE2KUBE_TAG='v0.3.8-rc.0' bash <(curl https://raw.githubusercontent.com/konveyor/move2kube/main/scripts/install.sh) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 10818 100 10818 0 0 14568 0 --:--:-- --:--:-- --:--:-- 14658 Installing move2kube Downloading https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 The desired Move2Kube version v0.3.8-rc.0 is already installed Done! cleaning up temporary files and directories... ``` -------------------------------- ### Install Move2Kube via Shell Script Source: https://move2kube.konveyor.io/ Executes the installation script directly from the Move2Kube repository. ```bash $ bash <(curl https://raw.githubusercontent.com/konveyor/move2kube/main/scripts/install.sh) ``` -------------------------------- ### Download sample application Source: https://move2kube.konveyor.io/tutorials/customizing-the-output/custom-annotations Fetch the enterprise-app sample to use as the input source for transformation. ```bash $ curl https://move2kube.konveyor.io/scripts/download.sh | bash -s -- -d samples/enterprise-app/src -r move2kube-demos $ ls src README.md config-utils customers docs frontend gateway orders ``` -------------------------------- ### Download Sample Application Source: https://move2kube.konveyor.io/tutorials/customizing-the-output/external-transformer-illustration Fetch the enterprise-app sample and list its contents. ```bash $ curl https://move2kube.konveyor.io/scripts/download.sh | bash -s -- -d samples/enterprise-app/src -r move2kube-demos $ ls src README.md config-utils customers docs frontend gateway orders ``` -------------------------------- ### Verify container runtime and Kubernetes installation Source: https://move2kube.konveyor.io/tutorials/netcore Commands to check if Docker, Podman, and Kubectl are installed correctly. ```bash $ docker version ``` ```bash $ podman info ``` ```bash $ kubectl version ``` -------------------------------- ### Initialize Workspace Source: https://move2kube.konveyor.io/tutorials/customizing-the-output/external-transformer-illustration Create and enter a new directory for the project. ```bash $ mkdir workspace && cd workspace ``` -------------------------------- ### Install Move2Kube via Homebrew Source: https://move2kube.konveyor.io/installation/cli Install Move2Kube using the Homebrew package manager on MacOS or Linux. ```bash brew tap konveyor/move2kube brew install move2kube ``` ```bash brew install move2kube@0.3.0-beta.0 ``` -------------------------------- ### Download Language Platforms Sample Source: https://move2kube.konveyor.io/tutorials/m2k-extension Downloads the sample application directory required for the transformation tutorial. ```bash $ curl https://move2kube.konveyor.io/scripts/download.sh | bash -s -- -d samples/language-platforms -r move2kube-demos $ ls language-platforms django golang java-gradle java-gradle-war java-maven java-maven-war nodejs php python ruby rust ``` -------------------------------- ### Filter apps by space GUID Source: https://move2kube.konveyor.io/tutorials/collect-selected-cf-apps Restrict the collection process to a specific Cloud Foundry space using a space GUID. ```yaml apiVersion: move2kube.konveyor.io/v1alpha1 kind: CfCollectApps spec: filters: spaceguid: dummy-cf-space-guid applications: - application: # guid: dummy-cf-app-guid-inventory name: inventory - application: name: cfnodejsapp # guid: dummy-cf-app-guid-cfnodejsapp ``` -------------------------------- ### Verify dependencies Source: https://move2kube.konveyor.io/tutorials/cloud-foundry Commands to verify that Move2Kube, container runtimes, and kubectl are installed. ```bash $ move2kube version ``` ```bash $ docker version ``` ```bash $ podman info ``` ```bash $ kubectl version ``` -------------------------------- ### Verify Move2Kube Version Source: https://move2kube.konveyor.io/tutorials/collect-selected-cf-apps Check the currently installed version of the Move2Kube CLI. ```bash $ move2kube version -l move2kube version -l version: v0.3.8-rc.0 gitCommit: 5113d4ce474a1bdba04d1656490ddec38a36d804 gitTreeState: clean goVersion: go1.18.10 ``` -------------------------------- ### Download Sample Application Source: https://move2kube.konveyor.io/tutorials/migrating-from-docker-compose-to-kubernetes Download the multi-service Docker Compose sample from the move2kube-demos repository. ```bash $ curl https://move2kube.konveyor.io/scripts/download.sh | bash -s -- -d samples/docker-compose/multiple-services -r move2kube-demos $ ls multiple-services ``` -------------------------------- ### Execute and Monitor Transformations Source: https://move2kube.konveyor.io/tutorials/api Start a transformation and check its status or retrieve output. ```bash $ curl -iX POST 'http://localhost:8080/api/v1/workspaces/c16f3be9-413c-406a-89b7-ea463950780e/projects/e9a94c62-77a4-480b-ae4e-33307a5a600b/outputs' ``` ```bash $ curl -i 'http://localhost:8080/api/v1/workspaces/c16f3be9-413c-406a-89b7-ea463950780e/projects/e9a94c62-77a4-480b-ae4e-33307a5a600b/outputs/ae4435e5-9506-419e-a38b-0a2692d41209' \ -H 'accept: application/octet-stream' ``` -------------------------------- ### Helm Values Configuration Source: https://move2kube.konveyor.io/tutorials/customizing-the-output/custom-parameterization-of-helm-charts-kustomize-octemplates Example of a production values file for Helm charts. ```bash $ cat myproject/deploy/yamls-parameterized/helm-chart/myproject/values-prod.yaml ``` ```yaml common: replicas: 10 imageregistry: namespace: konveyor url: quay.io services: config-utils: containers: config-utils: image: name: myimage tag: latest customers: containers: customers: image: name: myimage tag: latest frontend: containers: frontend: image: name: frontend tag: latest gateway: containers: gateway: image: name: myimage tag: latest orders: containers: orders: image: name: orders tag: latest ``` -------------------------------- ### Download sample WCF service Source: https://move2kube.konveyor.io/tutorials/dotnet Use this command to fetch the sample WCF service from the move2kube-demos repository. ```bash $ curl https://move2kube.konveyor.io/scripts/download.sh | bash -s -- -d samples/wcfservice -r move2kube-demos ``` -------------------------------- ### Download sample applications Source: https://move2kube.konveyor.io/tutorials/netcore Use the provided script to download the dotnet5 sample applications from the move2kube-demos repository. ```bash $ curl https://move2kube.konveyor.io/scripts/download.sh | bash -s -- -d samples/dotnet5 -r move2kube-demos ``` -------------------------------- ### View Readme Instructions Source: https://move2kube.konveyor.io/tutorials/cli Display the contents of the generated Readme.md file to understand the next steps for deployment. ```bash $ cat Readme.md ``` -------------------------------- ### Initialize workspace Source: https://move2kube.konveyor.io/tutorials/customizing-the-output/custom-annotations Create and enter a new directory for the Move2Kube project. ```bash $ mkdir workspace && cd workspace ``` -------------------------------- ### Navigate to Project Directory Source: https://move2kube.konveyor.io/tutorials/cloud-foundry Change into the generated project directory and verify the file structure. ```bash $ cd myproject/ $ ls Readme.md deploy scripts source ``` -------------------------------- ### Transformation Output Example Source: https://move2kube.konveyor.io/tutorials/migration-workflow/transform A sample of the console output generated during the interactive transformation process. ```text INFO[0000] Detected a plan file at path /Users/user/Desktop/tutorial/m2k.plan. Will transform using this plan. INFO[0000] Starting Plan Transformation ? Select all transformer types that you are interested in: ID: move2kube.transformers.types Hints: [Services that don't support any of the transformer types you are interested in will be ignored.] Buildconfig, CloudFoundry, ClusterSelector, ComposeAnalyser, ComposeGenerator, ContainerImagesPushScriptGenerator, DockerfileDetector, DockerfileImageBuildScript, DockerfileParser, DotNetCore-Dockerfile, EarAnalyser, EarRouter, Golang-Dockerfile, Gradle, Jar, Jboss, Knative, Kubernetes, KubernetesVersionChanger, Liberty, Maven, Nodejs-Dockerfile, PHP-Dockerfile, Parameterizer, Python-Dockerfile, ReadMeGenerator, Ruby-Dockerfile, Rust-Dockerfile, Tekton, Tomcat, WarAnalyser, WarRouter, WinConsoleApp-Dockerfile, WinSLWebApp-Dockerfile, WinWebApp-Dockerfile, ZuulAnalyser ? Select all services that are needed: ID: move2kube.services.[].enable Hints: [The services unselected here will be ignored.] customers, frontend, gateway, inventory, orders INFO[0005] Iteration 1 INFO[0005] Iteration 2 - 5 artifacts to process INFO[0005] Transformer CloudFoundry processing 3 artifacts INFO[0005] Transformer CloudFoundry Done INFO[0005] Transformer Maven processing 2 artifacts ? Choose the Maven profile to be used for the service customers ID: move2kube.services.customers.activemavenprofiles Hints: [Selected Maven profiles will be used for setting configuration for the service customers] prod-externaldb ? Choose Springboot profiles to be used for the service customers ID: move2kube.services.customers.activespringbootprofiles Hints: [Selected Springboot profiles will be used for setting configuration for the service customers] prod-externaldb ? Choose the Maven profile to be used for the service inventory ID: move2kube.services.inventory.activemavenprofiles Hints: [Selected Maven profiles will be used for setting configuration for the service inventory] prod-externaldb ? Choose Springboot profiles to be used for the service inventory ID: move2kube.services.inventory.activespringbootprofiles Hints: [Selected Springboot profiles will be used for setting configuration for the service inventory] prod-externaldb ? Select port to be exposed for the service inventory : ID: move2kube.services.inventory.port Hints: [Select Other if you want to expose the service inventory to some other port] 8080 INFO[0010] Transformer WarRouter processing 2 artifacts ? Select the transformer to use for service customers ID: move2kube.services.customers.wartransformer Tomcat INFO[0012] Transformer WarRouter Done INFO[0012] Transformer Maven Done INFO[0012] Created 2 pathMappings and 6 artifacts. Total Path Mappings : 2. Total Artifacts : 5. INFO[0012] Iteration 3 - 6 artifacts to process INFO[0012] Transformer Jar processing 1 artifacts INFO[0012] Transformer Jar Done INFO[0012] Transformer Maven processing 2 artifacts ``` -------------------------------- ### View values.yaml content Source: https://move2kube.konveyor.io/transformers/purpose-built/parameterizer Commands and output examples for inspecting the generated values.yaml file. ```bash $ cat values.yaml ``` ```yaml common: replicas: 10 ``` ```bash $ cat values.yaml ``` ```yaml common: replicas: 2 ``` ```bash $ cat values.yaml ``` ```yaml common: replicas: 10 ``` -------------------------------- ### CfApps YAML Structure Source: https://move2kube.konveyor.io/tutorials/migration-workflow/collect Example of the generated CfApps YAML file containing application metadata. ```yaml # click to see the full yaml apiVersion: move2kube.konveyor.io/v1alpha1 kind: CfApps ...... ``` ```yaml apiVersion: move2kube.konveyor.io/v1alpha1 kind: CfApps spec: applications: - application: guid: id1 createdat: "2021-12-14T10:01:40Z" updatedat: "2021-12-14T10:03:08Z" name: orders memory: 1024 instances: 1 diskquota: 1024 spaceguid: space-id1 stackguid: stack-id1 state: STARTED packagestate: STAGED command: "" buildpack: https://github.com/cloudfoundry/java-buildpack detectedbuildpack: java detectedbuildpackguid: "" healthcheckhttpendpoint: "" healthchecktype: port healthchecktimeout: 0 diego: true enablessh: true detectedstartcommand: 'JAVA_OPTS="-agentpath:$PWD/.java-buildpack/open_jdk_jre/bin/jvmkill-1.16.0_RELEASE=printHeapHistogram=1 -Djava.io.tmpdir=$TMPDIR -XX:ActiveProcessorCount=$(nproc) -Djava.ext.dirs=$PWD/.java-buildpack/container_security_provider:$PWD/.java-buildpack/open_jdk_jre/lib/ext -Djava.security.properties=$PWD/.java-buildpack/java_security/java.security $JAVA_OPTS" && CALCULATED_MEMORY=$($PWD/.java-buildpack/open_jdk_jre/bin/java-buildpack-memory-calculator-3.13.0_RELEASE -totMemory=$MEMORY_LIMIT -loadedClasses=23193 -poolType=metaspace -stackThreads=250 -vmOptions="$JAVA_OPTS") && echo JVM Memory Configuration: $CALCULATED_MEMORY && JAVA_OPTS="$JAVA_OPTS $CALCULATED_MEMORY" && MALLOC_ARENA_MAX=2 SERVER_PORT=$PORT eval exec $PWD/.java-buildpack/open_jdk_jre/bin/java $JAVA_OPTS -cp $PWD/. org.springframework.boot.loader.JarLauncher' dockerimage: "" dockercredentialsjson: {} dockercredentials: username: "" password: "" environment: {} stagingfailedreason: "" stagingfaileddescription: "" ports: - 8080 spaceurl: /v2/spaces/space-id1 spacedata: meta: guid: space-id1 url: /v2/spaces/space-id1 createdat: "2020-10-05T05:29:46Z" updatedat: "2020-10-05T05:29:46Z" entity: guid: space-id1 createdat: "" updatedat: "" name: dev organizationguid: org-id1 orgurl: /v2/organizations/org-id1 orgdata: meta: guid: org-id1 url: /v2/organizations/org-id1 createdat: "2020-10-05T05:29:31Z" updatedat: "2020-10-05T05:29:31Z" entity: guid: org-id1 createdat: "" updatedat: "" ``` -------------------------------- ### Configure Project Inputs Source: https://move2kube.konveyor.io/tutorials/api Upload source files to a project to prepare for transformation. ```bash $ curl -iX POST 'http://localhost:8080/api/v1/workspaces/c16f3be9-413c-406a-89b7-ea463950780e/projects/e9a94c62-77a4-480b-ae4e-33307a5a600b/inputs' \ -F type=sources \ -F filename='language-platforms.zip' \ -F file=@/path/to/language-platforms.zip ``` -------------------------------- ### Cluster Metadata YAML Structure Source: https://move2kube.konveyor.io/tutorials/customize-cluster-selector Example of the ClusterMetadata YAML structure used for target configuration. ```yaml # click to see the full plan yaml apiVersion: move2kube.konveyor.io/v1alpha1 kind: ClusterMetadata metadata: name: my-kubernetes-cluster ....... ``` ```yaml apiVersion: move2kube.konveyor.io/v1alpha1 kind: ClusterMetadata metadata: name: my-kubernetes-cluster spec: storageClasses: - default - ibmc-file-bronze - ibmc-file-bronze-gid - ibmc-file-custom - ibmc-file-gold - ibmc-file-gold-gid - ibmc-file-retain-bronze - ibmc-file-retain-custom - ibmc-file-retain-gold ``` -------------------------------- ### Transform Docker Compose to Kubernetes Source: https://move2kube.konveyor.io/ Downloads a sample docker-compose file and initiates the transformation process. ```bash $ wget -P samples/docker-compose/ https://raw.githubusercontent.com/konveyor/move2kube-demos/main/samples/docker-compose/single-service/docker-compose.yaml $ cd samples $ move2kube transform -s docker-compose ``` -------------------------------- ### List Template Files Source: https://move2kube.konveyor.io/tutorials/customizing-the-output/custom-dockerfile-change-built-in-behavior Verifies the presence of the custom Dockerfile and startup script. ```bash $ ls customizations/custom-dockerfile-change-built-in-behavior/nodejs/templates/ Dockerfile start-nodejs.sh ``` -------------------------------- ### View Deployment Parameterizer Configuration Source: https://move2kube.konveyor.io/tutorials/customizing-the-output/custom-parameterization-of-helm-charts-kustomize-octemplates Displays the contents of the deployment-parameterizers.yaml file. ```bash $ cat customizations/custom-helm-kustomize-octemplates-parameterization/deployment-parameterizers.yaml ``` -------------------------------- ### Verify Cloud Foundry CLI Version Source: https://move2kube.konveyor.io/tutorials/collect-selected-cf-apps Ensure the required Cloud Foundry CLI tools are installed and accessible. ```bash $ cf version cf version 6.53.0+8e2b70a4a.i ``` ```bash $ ibmcloud cf version Invoking 'cf version'... cf version 6.53.0+8e2b70a4a.2020-10-01 ``` -------------------------------- ### Navigate to Samples Directory Source: https://move2kube.konveyor.io/tutorials/netcore Change the current working directory to the samples folder before running transformation commands. ```bash $ cd samples ``` -------------------------------- ### Deploy Database Dependencies Source: https://move2kube.konveyor.io/tutorials/migration-workflow/transform Download and apply database configuration files for the selected deployment profile. ```bash $ cd .. $ curl https://move2kube.konveyor.io/scripts/download.sh | bash -s -- -d samples/enterprise-app/database -r move2kube-demos $ minikube start --memory 8192 --cpus 2 # do this only if you are deploying to Minikube $ kubectl apply -f database/ ``` -------------------------------- ### Start Minikube Tunnel Source: https://move2kube.konveyor.io/tutorials/migrating-from-docker-compose-to-kubernetes Exposes the ingress service to the local machine, requiring sudo privileges for privileged ports. ```bash $ minikube tunnel ❗ The service/ingress myproject requires privileged ports to be exposed: [80 443] πŸ”‘ sudo permission will be asked for it. πŸƒ Starting tunnel for service myproject. Password: ``` -------------------------------- ### View project directory structure Source: https://move2kube.konveyor.io/tutorials/dotnet Verify the contents of the downloaded wcfservice directory using the tree command. ```bash $ tree -L 2 wcfservice/ wcfservice/ β”œβ”€β”€ wcfservice β”‚Β Β  β”œβ”€β”€ App.config β”‚Β Β  β”œβ”€β”€ IWindowsSampleService.cs β”‚Β Β  β”œβ”€β”€ Properties β”‚Β Β  β”œβ”€β”€ WindowsSampleService.cs β”‚Β Β  β”œβ”€β”€ wcfservice.cs β”‚Β Β  └── wcfservice.csproj └── wcfservice.sln 2 directories, 6 files ``` -------------------------------- ### Plan and transform source code Source: https://move2kube.konveyor.io/tutorials/running-non-interactively Generate a transformation plan and execute the transformation interactively to create the initial configuration files. ```bash $ ls language-platforms $ move2kube plan -s language-platforms INFO[0000] Configuration loading done INFO[0000] Planning Transformation - Base Directory ... INFO[0000] Plan can be found at [/Users/user/Desktop/tutorial/m2k.plan]. $ move2kube transform INFO[0000] Detected a plan file at path /Users/user/Desktop/tutorial/m2k.plan. Will transform using this plan. ... INFO[0095] Plan Transformation done INFO[0095] Transformed target artifacts can be found at [/Users/user/Desktop/tutorial/myproject]. ``` -------------------------------- ### Transformation Log Output Source: https://move2kube.konveyor.io/tutorials/netcore Example of the console output generated during the transformation process as Move2Kube processes various artifacts. ```text INFO[1850] Transformer Kubernetes Done INFO[1850] Transformer ComposeGenerator processing 2 artifacts INFO[1851] Transformer ComposeGenerator Done INFO[1851] Transformer ClusterSelector processing 2 artifacts INFO[1851] Transformer ClusterSelector Done INFO[1851] Transformer Buildconfig processing 2 artifacts INFO[1851] Transformer Buildconfig Done INFO[1851] Transformer ClusterSelector processing 2 artifacts INFO[1851] Transformer ClusterSelector Done INFO[1851] Transformer Knative processing 2 artifacts INFO[1851] Transformer Knative Done INFO[1851] Transformer ClusterSelector processing 2 artifacts INFO[1851] Transformer ClusterSelector Done INFO[1851] Transformer Tekton processing 2 artifacts INFO[1851] Transformer Tekton Done INFO[1851] Transformer ContainerImagesPushScriptGenerator processing 2 artifacts INFO[1851] Transformer ContainerImagesPushScriptGenerator Done INFO[1852] Created 33 pathMappings and 7 artifacts. Total Path Mappings : 42. Total Artifacts : 19. INFO[1852] Iteration 5 - 7 artifacts to process INFO[1852] Transformer Parameterizer processing 4 artifacts INFO[1852] Transformer Parameterizer Done INFO[1852] Transformer ReadMeGenerator processing 5 artifacts INFO[1852] Transformer ReadMeGenerator Done INFO[1852] Plan Transformation done INFO[1852] Transformed target artifacts can be found at [/Users/username/github/move2kube-demos/samples/myproject]. ``` -------------------------------- ### Transformation Process Logs Source: https://move2kube.konveyor.io/tutorials/cloud-foundry Example output logs generated during the transformation process, showing various transformer activities. ```text docker INFO[1184] Created 1 pathMappings and 2 artifacts. Total Path Mappings : 30. Total Artifacts : 11. INFO[1184] Transformer DockerfileImageBuildScript Done INFO[1184] Transformer DockerfileParser processing 1 artifacts INFO[1184] Created 0 pathMappings and 1 artifacts. Total Path Mappings : 30. Total Artifacts : 11. INFO[1184] Transformer DockerfileParser Done INFO[1184] Transformer Parameterizer processing 4 artifacts INFO[1184] Created 12 pathMappings and 0 artifacts. Total Path Mappings : 42. Total Artifacts : 11. INFO[1184] Transformer Parameterizer Done INFO[1184] Iteration 5 INFO[1184] Transformer Tekton processing 2 artifacts INFO[1184] Begin Optimization INFO[1184] Optimization done INFO[1184] Generating Tekton pipeline for CI/CD INFO[1184] No remote git repos detected. You might want to configure the git repository links manually. INFO[1184] Begin Optimization INFO[1184] Optimization done INFO[1184] Generating Tekton pipeline for CI/CD INFO[1184] No remote git repos detected. You might want to configure the git repository links manually. INFO[1184] Created 20 pathMappings and 2 artifacts. Total Path Mappings : 62. Total Artifacts : 14. INFO[1184] Transformer Tekton Done INFO[1184] Transformer Buildconfig processing 2 artifacts INFO[1184] Begin Optimization INFO[1185] Optimization done INFO[1185] Created 0 pathMappings and 0 artifacts. Total Path Mappings : 62. Total Artifacts : 14. INFO[1185] Transformer Buildconfig Done INFO[1185] Transformer ComposeGenerator processing 2 artifacts INFO[1185] Begin Optimization INFO[1185] Optimization done INFO[1185] Begin Optimization INFO[1185] Optimization done INFO[1185] Created 2 pathMappings and 0 artifacts. Total Path Mappings : 64. Total Artifacts : 14. INFO[1185] Transformer ComposeGenerator Done INFO[1185] Transformer ContainerImagesPushScriptGenerator processing 2 artifacts INFO[1185] Created 1 pathMappings and 1 artifacts. Total Path Mappings : 65. Total Artifacts : 14. INFO[1185] Transformer ContainerImagesPushScriptGenerator Done INFO[1185] Transformer Kubernetes processing 2 artifacts INFO[1185] Begin Optimization INFO[1185] Optimization done INFO[1185] Total transformed objects : 3 INFO[1185] Begin Optimization INFO[1185] Optimization done INFO[1185] Total transformed objects : 3 INFO[1185] Created 2 pathMappings and 2 artifacts. Total Path Mappings : 67. Total Artifacts : 14. INFO[1185] Transformer Kubernetes Done INFO[1185] Transformer ContainerImagesBuildScriptGenerator processing 2 artifacts INFO[1185] Created 2 pathMappings and 1 artifacts. Total Path Mappings : 69. Total Artifacts : 14. INFO[1185] Transformer ContainerImagesBuildScriptGenerator Done INFO[1185] Transformer Knative processing 2 artifacts INFO[1185] Begin Optimization INFO[1185] Optimization done INFO[1185] Begin Optimization INFO[1185] Optimization done INFO[1185] Created 2 pathMappings and 2 artifacts. Total Path Mappings : 71. Total Artifacts : 14. INFO[1185] Transformer Knative Done INFO[1185] Iteration 6 INFO[1185] Transformer Parameterizer processing 4 artifacts INFO[1185] Created 12 pathMappings and 0 artifacts. Total Path Mappings : 83. Total Artifacts : 22. INFO[1185] Transformer Parameterizer Done INFO[1185] Transformer ReadMeGenerator processing 6 artifacts INFO[1185] Created 1 pathMappings and 0 artifacts. Total Path Mappings : 84. Total Artifacts : 22. INFO[1185] Transformer ReadMeGenerator Done INFO[1185] Plan Transformation done INFO[1185] Transformed target artifacts can be found at [/Users/username/github/move2kube-demos/samples/myproject]. ``` -------------------------------- ### Handle authentication errors Source: https://move2kube.konveyor.io/tutorials/move2kube-collect Example of an error message encountered when authentication tokens are missing or invalid for a specific source. ```text ERRO[0010] Unable to get list of cf apps : Error requesting apps: cfclient error (CF-InvalidAuthToken|1000): Invalid Auth Token ```