diff --git a/content/Move2Kube/Tutorials/CFappsToK8/3transform.md b/content/Move2Kube/Tutorials/CFappsToK8/3transform.md index 77b4ad1..a0539ec 100644 --- a/content/Move2Kube/Tutorials/CFappsToK8/3transform.md +++ b/content/Move2Kube/Tutorials/CFappsToK8/3transform.md @@ -29,14 +29,18 @@ Perform the Plan step before this procedure. ## Transforming using the CLI 1. Run the transformation in the same directory as the plan file. This will detect the plan file and use it to find the source directory. + ``` $ move2kube transform Optional: Provide answers to questions using a config file... ``` + If you want to avoid the question answers during transformation, you can use this [config file](https://github.com/konveyor/move2kube-demos/blob/main/samples/enterprise-app/config/m2kconfig.yaml) + ``` $ move2kube transform --config m2kconfig.yaml ``` + 2. Answer all the questions as appropriate. For most questions accept the default answers. Some questions to watch out for are: - A spurious service called `config-utils` was detected by one of the transformers can be deselected when asked to select the services or by editing the plan file. @@ -45,11 +49,10 @@ $ move2kube transform --config m2kconfig.yaml - The ingress hostname and ingress TLS secret. If deploying to MiniKube, give `localhost` as the ingress host and leave the TLS secret blank. - Select `ClusterIP` to only expose the `order` `customers` `inventory` and `gateway` services inside the cluster. Choose `Ingress` and `/` as the path to expose the `frontend` service. This way only the `frontend` will be exposed outside the cluster through the ingress. - ```console $ move2kube transform INFO[0000] Detected a plan file at path /Users/user/Desktop/tutorial/m2k.plan. Will transform using this plan. -INFO[0000] Starting Plan Transformation +INFO[0000] Starting Plan Transformation ? Select all transformer types that you are interested in: ID: move2kube.transformers.types Hints: @@ -60,14 +63,16 @@ 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] 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 ``` + {{%expand "Click to see the remaining transform questions."%}} -```console + +```console ? Choose the Maven profile to be used for the service customers ID: move2kube.services.customers.activemavenprofiles Hints: @@ -97,13 +102,13 @@ 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] 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 +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 ? Choose the Maven profile to be used for the service gateway ID: move2kube.services.gateway.activemavenprofiles Hints: @@ -134,16 +139,16 @@ ID: move2kube.services.orders.port Hints: [Select Other if you want to expose the service orders to some other port] 8080 -INFO[0018] Transformer Maven Done +INFO[0018] Transformer Maven Done INFO[0018] Transformer Nodejs-Dockerfile processing 1 artifacts ? Enter the port to be exposed for the service frontend: ID: move2kube.services.frontend.port Hints: [The service frontend will be exposed to the specified port] 8080 -INFO[0021] Transformer Nodejs-Dockerfile Done +INFO[0021] Transformer Nodejs-Dockerfile Done INFO[0021] Transformer Tomcat processing 2 artifacts -INFO[0021] Transformer Tomcat Done +INFO[0021] Transformer Tomcat Done INFO[0021] Created 10 pathMappings and 10 artifacts. Total Path Mappings : 12. Total Artifacts : 11. INFO[0021] Iteration 4 - 10 artifacts to process INFO[0021] Transformer DockerfileImageBuildScript processing 4 artifacts @@ -152,13 +157,13 @@ ID: move2kube.containerruntime Hints: [The container runtime selected will be used in the scripts] docker -INFO[0022] Transformer DockerfileImageBuildScript Done +INFO[0022] Transformer DockerfileImageBuildScript Done INFO[0022] Transformer DockerfileParser processing 4 artifacts INFO[0022] Transformer ZuulAnalyser processing 2 artifacts INFO[0022] Transformer ZuulAnalyser Done INFO[0022] Transformer DockerfileParser Done -INFO[0022] Transformer Jar processing 2 artifacts -INFO[0022] Transformer Jar Done +INFO[0022] Transformer Jar processing 2 artifacts +INFO[0022] Transformer Jar Done INFO[0022] Created 5 pathMappings and 10 artifacts. Total Path Mappings : 17. Total Artifacts : 21. INFO[0022] Iteration 5 - 10 artifacts to process INFO[0022] Transformer ClusterSelector processing 2 artifacts @@ -167,7 +172,7 @@ ID: move2kube.target.clustertype Hints: [Choose the cluster type you would like to target] Kubernetes -INFO[0024] Transformer ClusterSelector Done +INFO[0024] Transformer ClusterSelector Done INFO[0024] Transformer Buildconfig processing 2 artifacts ? What kind of service/ingress to create for inventory's 8080 port? ID: move2kube.services."inventory"."8080".servicetype @@ -209,23 +214,23 @@ ID: move2kube.target.imageregistry.logintype Hints: [Docker login from config mode, will use the default config from the local machine.] No authentication -INFO[0051] Transformer Buildconfig Done +INFO[0051] Transformer Buildconfig Done INFO[0051] Transformer ComposeGenerator processing 2 artifacts INFO[0051] Transformer ComposeGenerator Done INFO[0051] Transformer ContainerImagesPushScriptGenerator processing 2 artifacts INFO[0051] Transformer ContainerImagesPushScriptGenerator Done INFO[0051] Transformer DockerfileImageBuildScript processing 3 artifacts -INFO[0051] Transformer DockerfileImageBuildScript Done +INFO[0051] Transformer DockerfileImageBuildScript Done INFO[0051] Transformer DockerfileParser processing 2 artifacts INFO[0051] Transformer ZuulAnalyser processing 2 artifacts INFO[0051] Transformer ZuulAnalyser Done INFO[0051] Transformer DockerfileParser Done INFO[0051] Transformer ClusterSelector processing 2 artifacts -INFO[0051] Transformer ClusterSelector Done -INFO[0051] Transformer Knative processing 2 artifacts -INFO[0051] Transformer Knative Done +INFO[0051] Transformer ClusterSelector Done +INFO[0051] Transformer Knative processing 2 artifacts +INFO[0051] Transformer Knative Done INFO[0051] Transformer ClusterSelector processing 2 artifacts -INFO[0051] Transformer ClusterSelector Done +INFO[0051] Transformer ClusterSelector Done INFO[0051] Transformer Kubernetes processing 2 artifacts ? Provide the ingress host domain ID: move2kube.target.ingress.host @@ -237,15 +242,15 @@ ID: move2kube.target.ingress.tls Hints: [Leave empty to use http] -INFO[0058] Transformer Kubernetes Done +INFO[0058] Transformer Kubernetes Done INFO[0058] Transformer ClusterSelector processing 2 artifacts -INFO[0058] Transformer ClusterSelector Done +INFO[0058] Transformer ClusterSelector Done INFO[0058] Transformer Tekton processing 2 artifacts -INFO[0059] Transformer Tekton Done +INFO[0059] Transformer Tekton Done INFO[0059] Created 32 pathMappings and 15 artifacts. Total Path Mappings : 49. Total Artifacts : 31. INFO[0059] Iteration 6 - 15 artifacts to process INFO[0059] Transformer ClusterSelector processing 2 artifacts -INFO[0059] Transformer ClusterSelector Done +INFO[0059] Transformer ClusterSelector Done INFO[0059] Transformer Buildconfig processing 2 artifacts ? What kind of service/ingress to create for orders's 8080 port? ID: move2kube.services."orders"."8080".servicetype @@ -257,39 +262,41 @@ ID: move2kube.services."gateway"."8080".servicetype Hints: [Choose Ingress if you want a ingress/route resource to be created] ClusterIP -INFO[0066] Transformer Buildconfig Done +INFO[0066] Transformer Buildconfig Done INFO[0066] Transformer ComposeGenerator processing 2 artifacts INFO[0066] Transformer ComposeGenerator Done INFO[0066] Transformer ContainerImagesPushScriptGenerator processing 2 artifacts INFO[0066] Transformer ContainerImagesPushScriptGenerator Done INFO[0066] Transformer ClusterSelector processing 2 artifacts -INFO[0067] Transformer ClusterSelector Done -INFO[0067] Transformer Knative processing 2 artifacts -INFO[0067] Transformer Knative Done +INFO[0067] Transformer ClusterSelector Done +INFO[0067] Transformer Knative processing 2 artifacts +INFO[0067] Transformer Knative Done INFO[0067] Transformer ClusterSelector processing 2 artifacts -INFO[0067] Transformer ClusterSelector Done +INFO[0067] Transformer ClusterSelector Done INFO[0067] Transformer Kubernetes processing 2 artifacts -INFO[0067] Transformer Kubernetes Done +INFO[0067] Transformer Kubernetes Done INFO[0067] Transformer Parameterizer processing 4 artifacts -INFO[0067] Transformer Parameterizer Done +INFO[0067] Transformer Parameterizer Done INFO[0067] Transformer ReadMeGenerator processing 5 artifacts -INFO[0067] Transformer ReadMeGenerator Done +INFO[0067] Transformer ReadMeGenerator Done INFO[0067] Transformer ClusterSelector processing 2 artifacts -INFO[0067] Transformer ClusterSelector Done +INFO[0067] Transformer ClusterSelector Done INFO[0067] Transformer Tekton processing 2 artifacts -INFO[0068] Transformer Tekton Done +INFO[0068] Transformer Tekton Done INFO[0068] Created 52 pathMappings and 7 artifacts. Total Path Mappings : 101. Total Artifacts : 46. -INFO[0068] Iteration 7 - 7 artifacts to process +INFO[0068] Iteration 7 - 7 artifacts to process INFO[0068] Transformer Parameterizer processing 4 artifacts -INFO[0068] Transformer Parameterizer Done +INFO[0068] Transformer Parameterizer Done INFO[0068] Transformer ReadMeGenerator processing 5 artifacts -INFO[0068] Transformer ReadMeGenerator Done -INFO[0069] Plan Transformation done +INFO[0068] Transformer ReadMeGenerator Done +INFO[0069] Plan Transformation done INFO[0069] Transformed target artifacts can be found at [/Users/user/Desktop/tutorial/myproject]. ``` + {{% /expand%}} ## Transforming using the UI + Continue from the previous step in the UI. 1. Scroll down from the **Plan** section to the **Outputs** section. @@ -311,19 +318,20 @@ spec: artifactType: jar customers-tomcat: - transformerName: Maven - + ``` + 2. Click the **Start transformation** button. A form to ask the user questions to guide the transformation opens. 3. Answer all the questions as appropriate. For most questions accept the default answers. Some questions to watch out for are: -* A spurious service called `config-utils` was detected by one of the transformers can be deselected when asked to select the services or by editing the plan file. -* Move2Kube has detected the Maven profiles for each of the Java services. Select the `dev-inmemorydb` profile to deploy to MiniKube. There will be similar questions for the SpringBoot profiles. -* The container registry and namespace to use. A container registry is where all the images are stored (Example: Quay, Docker Hub, etc.). -* The ingress hostname and ingress TLS secret. If deploying to MiniKube, give `localhost` as the ingress host and leave the TLS secret blank. -* Select `ClusterIP` to only expose the `order` `customers` `inventory` and `gateway` services inside the cluster. Choose `Ingress` and `/` as the path to expose the `frontend` service. This way only the `frontend` will be exposed outside the cluster through the ingress. +- A spurious service called `config-utils` was detected by one of the transformers can be deselected when asked to select the services or by editing the plan file. +- Move2Kube has detected the Maven profiles for each of the Java services. Select the `dev-inmemorydb` profile to deploy to MiniKube. There will be similar questions for the SpringBoot profiles. +- The container registry and namespace to use. A container registry is where all the images are stored (Example: Quay, Docker Hub, etc.). +- The ingress hostname and ingress TLS secret. If deploying to MiniKube, give `localhost` as the ingress host and leave the TLS secret blank. +- Select `ClusterIP` to only expose the `order` `customers` `inventory` and `gateway` services inside the cluster. Choose `Ingress` and `/` as the path to expose the `frontend` service. This way only the `frontend` will be exposed outside the cluster through the ingress. 4. Click the **Next** button to continue going through the questions and then run the tranformation. @@ -338,37 +346,45 @@ For a sample output of what Move2Kube generates for this enterprise app, click [ After the output has generated, run the scripts inside the `scripts` directory. 1. Run the `builddockerimages.sh` script to build all the container images for each service using the Dockerfiles that were generated. + ``` $ cd myproject/scripts/ $ ./builddockerimages.sh ``` + 2. Run the `pushimages.sh` script to push them to the specified container registry. + ``` $ ./pushimages.sh ``` + 3. Because the `prod-externaldb` profile was selected, deploy the database using the YAMLs located [here](https://github.com/konveyor/move2kube-demos/tree/main/samples/enterprise-app/database). + ``` $ 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/ ``` + 4. Deploy the Kubernetes YAMLs that Move2Kube generated to the cluster + ``` $ kubectl apply -f deploy/yamls ``` + The application is now running on the cluster. -5. Get the URL where the app has been deployed to, using `kubectl get ingress myproject -o yaml` +5. Get the URL where the app has been deployed to, using `kubectl get ingress myproject -o yaml` > **Note:** If deployed to Minikube, enable the ingress addon and start `minikube tunnel` to access the ingress on `localhost`. ```console $ minikube addons enable ingress 💡 After the addon is enabled, please run "minikube tunnel" and the ingress resources would be available at "127.0.0.1" -▪ Using image k8s.gcr.io/ingress-nginx/controller:v1.0.4 -▪ Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1 -▪ Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.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 @@ -381,6 +397,7 @@ $ minikube tunnel 🏃 Starting tunnel for service myproject. Password: ``` + The app is now available on [http://localhost](http://localhost). > **Optional:** As part of the transformation, if Cloud Foundry runtime information is required, use the collect output in planning and transformation: Collect information from running apps. @@ -388,12 +405,13 @@ The app is now available on [http://localhost](http://localhost). ### Customizing the output After inspecting the output that Move2Kube produced some changes might be necessary. For example: -* Changing the base image used in the Dockerfiles. -* Adding some annotations to the Ingress YAML. -* Changing the output directory structure. -* Changing which values are parameterized in the Helm chart. -* Generating some new files, etc. + +- Changing the base image used in the Dockerfiles. +- Adding some annotations to the Ingress YAML. +- Changing the output directory structure. +- Changing which values are parameterized in the Helm chart. +- Generating some new files, etc. For all these user specific requirements and more, use customizations. -[Source](https://github.com/konveyor/konveyor.github.io/blob/main/content/Move2Kube/Tutorials/CFappsToK8/3transform.md) \ No newline at end of file +[Source](https://github.com/konveyor/konveyor.github.io/blob/main/content/Move2Kube/Tutorials/CFappsToK8/3transform.md) diff --git a/content/Move2Kube/Tutorials/migrateDockerComposeKube.md b/content/Move2Kube/Tutorials/migrateDockerComposeKube.md index 4d0029e..3b988b1 100644 --- a/content/Move2Kube/Tutorials/migrateDockerComposeKube.md +++ b/content/Move2Kube/Tutorials/migrateDockerComposeKube.md @@ -11,7 +11,8 @@ $ move2kube transform -s docker-compose ``` ## Prerequisites -* Install the Move2Kube CLI tool. + +- Install the Move2Kube CLI tool. > **Note:** This tutorial has been created with `v0.3.3-rc.2` version of Move2Kube. @@ -19,18 +20,18 @@ $ move2kube transform -s docker-compose $ MOVE2KUBE_TAG='v0.3.3-rc.2' bash <(curl https://raw.githubusercontent.com/konveyor/move2kube/main/scripts/install.sh) ``` -* Install a Kubernetes cluster from [MiniKube](https://minikube.sigs.k8s.io/docs/start/). +- Install a Kubernetes cluster from [MiniKube](https://minikube.sigs.k8s.io/docs/start/). ## Overview This tutorial shows how to migrate an application written for Docker Compose to run on Kubernetes using the two [Docker Compose](https://github.com/konveyor/move2kube-demos/tree/main/samples/docker-compose) samples from the [move2kube-demos](https://github.com/konveyor/move2kube-demos) repo. -* [Sample 1](https://github.com/konveyor/move2kube-demos/tree/main/samples/docker-compose/single-service) is a web app with a single service using Nginx and a prebuilt image. +- [Sample 1](https://github.com/konveyor/move2kube-demos/tree/main/samples/docker-compose/single-service) is a web app with a single service using Nginx and a prebuilt image. -* [Sample 2](https://github.com/konveyor/move2kube-demos/tree/main/samples/docker-compose/multiple-services) is more complicated. It is also a web app, but it has three services. - * A frontend written in PHP for Apache. - * An API backend written for NodeJS. - * A service for caching the calculations performed by the backend. +- [Sample 2](https://github.com/konveyor/move2kube-demos/tree/main/samples/docker-compose/multiple-services) is more complicated. It is also a web app, but it has three services. + - A frontend written in PHP for Apache. + - An API backend written for NodeJS. + - A service for caching the calculations performed by the backend. For the cache service use a prebuilt Redis image for this tutorial. @@ -48,6 +49,7 @@ multiple-services ``` 2. Run the planning phase. + ```console $ move2kube plan -s multiple-services/ INFO[0000] Configuration loading done @@ -74,7 +76,6 @@ INFO[0000] No of services identified : 3 INFO[0000] Plan can be found at [/Users/user/Desktop/tutorial/m2k.plan] ``` - 3. Inspect the plan to verify all three services were detected. ```console @@ -82,113 +83,113 @@ $ cat m2k.plan ``` ```yaml - apiVersion: move2kube.konveyor.io/v1alpha1 - kind: Plan - metadata: - name: myproject - spec: - sourceDir: multiple-services - services: - api: - - transformerName: ComposeAnalyser - paths: - DockerCompose: - - docker-compose.yaml - Dockerfile: - - api/Dockerfile - ServiceDirectories: - - api - configs: - ComposeService: - serviceName: api - - transformerName: Nodejs-Dockerfile - paths: - ServiceDirectories: - - api - - transformerName: DockerfileDetector - paths: - Dockerfile: - - api/Dockerfile - ServiceDirectories: - - api - redis: - - transformerName: ComposeAnalyser - paths: - DockerCompose: - - docker-compose.yaml - configs: - ComposeService: - serviceName: redis - web: - - transformerName: ComposeAnalyser - paths: - DockerCompose: - - docker-compose.yaml - Dockerfile: - - web/Dockerfile - ServiceDirectories: - - web - configs: - ComposeService: - serviceName: web - - transformerName: DockerfileDetector - paths: - Dockerfile: - - web/Dockerfile - ServiceDirectories: - - web - - transformerName: PHP-Dockerfile - paths: - ServiceDirectories: - - web - transformers: - ArgoCD: m2kassets/built-in/transformers/kubernetes/argocd/transformer.yaml - Buildconfig: m2kassets/built-in/transformers/kubernetes/buildconfig/transformer.yaml - CloudFoundry: m2kassets/built-in/transformers/cloudfoundry/transformer.yaml - ClusterSelector: m2kassets/built-in/transformers/kubernetes/clusterselector/transformer.yaml - ComposeAnalyser: m2kassets/built-in/transformers/compose/composeanalyser/transformer.yaml - ComposeGenerator: m2kassets/built-in/transformers/compose/composegenerator/transformer.yaml - ContainerImagesPushScriptGenerator: m2kassets/built-in/transformers/containerimagespushscript/transformer.yaml - DockerfileDetector: m2kassets/built-in/transformers/dockerfile/dockerfiledetector/transformer.yaml - DockerfileImageBuildScript: m2kassets/built-in/transformers/dockerfile/dockerimagebuildscript/transformer.yaml - DockerfileParser: m2kassets/built-in/transformers/dockerfile/dockerfileparser/transformer.yaml - DotNetCore-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/dotnetcore/transformer.yaml - EarAnalyser: m2kassets/built-in/transformers/dockerfilegenerator/java/earanalyser/transformer.yaml - EarRouter: m2kassets/built-in/transformers/dockerfilegenerator/java/earrouter/transformer.yaml - Golang-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/golang/transformer.yaml - Gradle: m2kassets/built-in/transformers/dockerfilegenerator/java/gradle/transformer.yaml - Jar: m2kassets/built-in/transformers/dockerfilegenerator/java/jar/transformer.yaml - Jboss: m2kassets/built-in/transformers/dockerfilegenerator/java/jboss/transformer.yaml - Knative: m2kassets/built-in/transformers/kubernetes/knative/transformer.yaml - Kubernetes: m2kassets/built-in/transformers/kubernetes/kubernetes/transformer.yaml - KubernetesVersionChanger: m2kassets/built-in/transformers/kubernetes/kubernetesversionchanger/transformer.yaml - Liberty: m2kassets/built-in/transformers/dockerfilegenerator/java/liberty/transformer.yaml - Maven: m2kassets/built-in/transformers/dockerfilegenerator/java/maven/transformer.yaml - Nodejs-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/nodejs/transformer.yaml - PHP-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/php/transformer.yaml - Parameterizer: m2kassets/built-in/transformers/kubernetes/parameterizer/transformer.yaml - Python-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/python/transformer.yaml - ReadMeGenerator: m2kassets/built-in/transformers/readmegenerator/transformer.yaml - Ruby-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/ruby/transformer.yaml - Rust-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/rust/transformer.yaml - Tekton: m2kassets/built-in/transformers/kubernetes/tekton/transformer.yaml - Tomcat: m2kassets/built-in/transformers/dockerfilegenerator/java/tomcat/transformer.yaml - WarAnalyser: m2kassets/built-in/transformers/dockerfilegenerator/java/waranalyser/transformer.yaml - WarRouter: m2kassets/built-in/transformers/dockerfilegenerator/java/warrouter/transformer.yaml - WinConsoleApp-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/windows/winconsole/transformer.yaml - WinSLWebApp-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/windows/winsilverlightweb/transformer.yaml - WinWebApp-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/windows/winweb/transformer.yaml - ZuulAnalyser: m2kassets/built-in/transformers/dockerfilegenerator/java/zuul/transformer.yaml +apiVersion: move2kube.konveyor.io/v1alpha1 +kind: Plan +metadata: + name: myproject +spec: + sourceDir: multiple-services + services: + api: + - transformerName: ComposeAnalyser + paths: + DockerCompose: + - docker-compose.yaml + Dockerfile: + - api/Dockerfile + ServiceDirectories: + - api + configs: + ComposeService: + serviceName: api + - transformerName: Nodejs-Dockerfile + paths: + ServiceDirectories: + - api + - transformerName: DockerfileDetector + paths: + Dockerfile: + - api/Dockerfile + ServiceDirectories: + - api + redis: + - transformerName: ComposeAnalyser + paths: + DockerCompose: + - docker-compose.yaml + configs: + ComposeService: + serviceName: redis + web: + - transformerName: ComposeAnalyser + paths: + DockerCompose: + - docker-compose.yaml + Dockerfile: + - web/Dockerfile + ServiceDirectories: + - web + configs: + ComposeService: + serviceName: web + - transformerName: DockerfileDetector + paths: + Dockerfile: + - web/Dockerfile + ServiceDirectories: + - web + - transformerName: PHP-Dockerfile + paths: + ServiceDirectories: + - web + transformers: + ArgoCD: m2kassets/built-in/transformers/kubernetes/argocd/transformer.yaml + Buildconfig: m2kassets/built-in/transformers/kubernetes/buildconfig/transformer.yaml + CloudFoundry: m2kassets/built-in/transformers/cloudfoundry/transformer.yaml + ClusterSelector: m2kassets/built-in/transformers/kubernetes/clusterselector/transformer.yaml + ComposeAnalyser: m2kassets/built-in/transformers/compose/composeanalyser/transformer.yaml + ComposeGenerator: m2kassets/built-in/transformers/compose/composegenerator/transformer.yaml + ContainerImagesPushScriptGenerator: m2kassets/built-in/transformers/containerimagespushscript/transformer.yaml + DockerfileDetector: m2kassets/built-in/transformers/dockerfile/dockerfiledetector/transformer.yaml + DockerfileImageBuildScript: m2kassets/built-in/transformers/dockerfile/dockerimagebuildscript/transformer.yaml + DockerfileParser: m2kassets/built-in/transformers/dockerfile/dockerfileparser/transformer.yaml + DotNetCore-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/dotnetcore/transformer.yaml + EarAnalyser: m2kassets/built-in/transformers/dockerfilegenerator/java/earanalyser/transformer.yaml + EarRouter: m2kassets/built-in/transformers/dockerfilegenerator/java/earrouter/transformer.yaml + Golang-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/golang/transformer.yaml + Gradle: m2kassets/built-in/transformers/dockerfilegenerator/java/gradle/transformer.yaml + Jar: m2kassets/built-in/transformers/dockerfilegenerator/java/jar/transformer.yaml + Jboss: m2kassets/built-in/transformers/dockerfilegenerator/java/jboss/transformer.yaml + Knative: m2kassets/built-in/transformers/kubernetes/knative/transformer.yaml + Kubernetes: m2kassets/built-in/transformers/kubernetes/kubernetes/transformer.yaml + KubernetesVersionChanger: m2kassets/built-in/transformers/kubernetes/kubernetesversionchanger/transformer.yaml + Liberty: m2kassets/built-in/transformers/dockerfilegenerator/java/liberty/transformer.yaml + Maven: m2kassets/built-in/transformers/dockerfilegenerator/java/maven/transformer.yaml + Nodejs-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/nodejs/transformer.yaml + PHP-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/php/transformer.yaml + Parameterizer: m2kassets/built-in/transformers/kubernetes/parameterizer/transformer.yaml + Python-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/python/transformer.yaml + ReadMeGenerator: m2kassets/built-in/transformers/readmegenerator/transformer.yaml + Ruby-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/ruby/transformer.yaml + Rust-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/rust/transformer.yaml + Tekton: m2kassets/built-in/transformers/kubernetes/tekton/transformer.yaml + Tomcat: m2kassets/built-in/transformers/dockerfilegenerator/java/tomcat/transformer.yaml + WarAnalyser: m2kassets/built-in/transformers/dockerfilegenerator/java/waranalyser/transformer.yaml + WarRouter: m2kassets/built-in/transformers/dockerfilegenerator/java/warrouter/transformer.yaml + WinConsoleApp-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/windows/winconsole/transformer.yaml + WinSLWebApp-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/windows/winsilverlightweb/transformer.yaml + WinWebApp-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/windows/winweb/transformer.yaml + ZuulAnalyser: m2kassets/built-in/transformers/dockerfilegenerator/java/zuul/transformer.yaml ``` 4. Run the transformation phase. > **Important:** For most prompts, accept the default in this tutorial. However, some prompts to watch out for are: -> -* **Kind of service/ingress created for the `redis` service:**. Select `ClusterIP` so the service port will not be exposed via the Ingress. -* **Exposed 'web' service URL path:** Since most website frontends are built to be served under `/` use that instead of `/web`. -* **Image registry URL and image registry namespace:** The image registry URL is where the container images will be pushed after building Docker Hub (index.docker.io), Quay (quay.io), IBM Cloud Container Registry (us.icr.io), etc. The `namespace` here means the username on the target image registry and not the Kubernetes cluster namespace. -* **Ingress host and TLS secret:** If deploying to MiniKube, use `localhost` as the ingress host domain. If deploying to a Kubernetes cluster on IBM Cloud, then find the ingress subdomain on the cluster on IBM Cloud as shown here. Leave the TLS secret blank. + +- **Kind of service/ingress created for the `redis` service:**. Select `ClusterIP` so the service port will not be exposed via the Ingress. +- **Exposed 'web' service URL path:** Since most website frontends are built to be served under `/` use that instead of `/web`. +- **Image registry URL and image registry namespace:** The image registry URL is where the container images will be pushed after building Docker Hub (index.docker.io), Quay (quay.io), IBM Cloud Container Registry (us.icr.io), etc. The `namespace` here means the username on the target image registry and not the Kubernetes cluster namespace. +- **Ingress host and TLS secret:** If deploying to MiniKube, use `localhost` as the ingress host domain. If deploying to a Kubernetes cluster on IBM Cloud, then find the ingress subdomain on the cluster on IBM Cloud as shown here. Leave the TLS secret blank. ```console $ move2kube transform @@ -335,7 +336,6 @@ The tranformatin is complete. 5. View the transformation output. - ```console # click to see the output $ ls @@ -504,7 +504,7 @@ Inside the `scripts` directory note some helpful scripts that Move2Kube has gene # click to see the output $ cd myproject/ $ ./builddockerimages.sh - [+] Building 4.3s (10/10) FINISHED + [+] Building 4.3s (10/10) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 133B 0.0s => [internal] load .dockerignore 0.0s @@ -524,7 +524,7 @@ $ ./builddockerimages.sh Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them /Users/user/Desktop/tutorial/myproject - [+] Building 2.5s (8/8) FINISHED + [+] Building 2.5s (8/8) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 82B 0.0s => [internal] load .dockerignore 0.0s @@ -547,7 +547,6 @@ $ ./builddockerimages.sh 7. Push the images to the registry and namespace selected using the `pushimages.sh` script. - ```console # click to see the output $ ./pushimages.sh @@ -582,11 +581,9 @@ $ ./builddockerimages.sh 9d1a9278f26b: Layer already exists latest: digest: sha256:521be8d409c29414274c912600dc7606b7db591f69abb2fbfb5e402ccb547878 size: 2840 ``` - > **Note:** If using Quay.io, change the pushed repositories `visibility` to `Public` or the Kubernetes pods may fail to pull the images from the registry and could fail to start due to `ErrImagePullBack`. - 8. If there is a Kubernetes cluster already, log in to it. Or, start MiniKube to start a local Kubernetes cluster. ```console @@ -600,26 +597,28 @@ $ ./builddockerimages.sh 🔎 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 k8s.gcr.io/ingress-nginx/controller:v1.0.4 - ▪ Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1 - ▪ Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.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 ``` > **Important:** Enable the ingress addon. + ```console $ 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 k8s.gcr.io/ingress-nginx/controller:v1.0.4 - ▪ Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1 - ▪ Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.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 ``` 9. Check if the kubectl related command will run. + ```console $ kubectl get pods ``` @@ -668,7 +667,7 @@ service/web created > **Important:** This step is required only if the app has been deployed on MiniKube cluster. -12. Access the running application using the Ingress created by starting a tunnel to the MiniKube cluster. +12. Access the running application using the Ingress created by starting a tunnel to the MiniKube cluster. ```console $ minikube tunnel @@ -682,6 +681,6 @@ Password: ## Conclusion - In this tutorial showed hot to transform a Docker Compose application with multiple services. We used Move2Kube to come up with a plan for migration, transform the input using the plan, generate the appropriate build scripts, Kubernetes YAMLs, etc. and deployed them to MiniKube. +In this tutorial showed hot to transform a Docker Compose application with multiple services. We used Move2Kube to come up with a plan for migration, transform the input using the plan, generate the appropriate build scripts, Kubernetes YAMLs, etc. and deployed them to MiniKube. -[Source](https://github.com/konveyor/konveyor.github.io/blob/main/content/Move2Kube/Tutorials/migrateDockerComposeKube.md) \ No newline at end of file +[Source](https://github.com/konveyor/konveyor.github.io/blob/main/content/Move2Kube/Tutorials/migrateDockerComposeKube.md) diff --git a/content/Move2Kube/Tutorials/usingCLI.md b/content/Move2Kube/Tutorials/usingCLI.md index 9e12b82..b12c337 100644 --- a/content/Move2Kube/Tutorials/usingCLI.md +++ b/content/Move2Kube/Tutorials/usingCLI.md @@ -4,6 +4,7 @@ date: 2022-08-04T19:09:57-06:00 draft: false weight: 3 --- + This tutorial shows how to transform a set of sample applications to run on Kubernetes using the Move2Kube CLI tool to generate the Kubernetes YAMLs, Dockerfiles, build scripts for each application, and then build the container images to deploy them to a cluster. ## Prerequisites @@ -15,6 +16,7 @@ This tutorial shows how to transform a set of sample applications to run on Kube ## Using the CLI to perform a transformation 1. Download the language platforms sample. Each directory contains a simple web application written in different languages. + ```console $ curl https://move2kube.konveyor.io/scripts/download.sh | bash -s -- -d samples/language-platforms -r move2kube-demos @@ -26,18 +28,20 @@ django golang java-gradle java-gradle-war java-maven java-maven-war nodejs ph ```console $ move2kube plan -s language-platforms -INFO[0000] Configuration loading done +INFO[0000] Configuration loading done INFO[0000] Planning Transformation - Base Directory -INFO[0000] [CloudFoundry] Planning transformation -INFO[0000] [CloudFoundry] Done +INFO[0000] [CloudFoundry] Planning transformation +INFO[0000] [CloudFoundry] Done INFO[0000] [ComposeAnalyser] Planning transformation -INFO[0000] [ComposeAnalyser] Done +INFO[0000] [ComposeAnalyser] Done INFO[0000] [DockerfileDetector] Planning transformation INFO[0000] [DockerfileDetector] Done INFO[0000] [Base Directory] Identified 0 named services and 0 to-be-named services INFO[0000] Transformation planning - Base Directory done ``` + {{%expand "Click to see the remaining output."%}} + ``` INFO[0000] Planning Transformation - Directory Walk INFO[0000] Identified 1 named services and 0 to-be-named services in django @@ -54,7 +58,7 @@ INFO[0000] Identified 1 named services and 0 to-be-named services in rust INFO[0000] Transformation planning - Directory Walk done INFO[0000] [Directory Walk] Identified 6 named services and 5 to-be-named services INFO[0000] [Named Services] Identified 11 named services -INFO[0000] No of services identified : 11 +INFO[0000] No of services identified : 11 INFO[0000] Plan can be found at [/Users/user/Desktop/tutorial/m2k.plan]. ``` @@ -67,16 +71,19 @@ $ ls language-platforms language-platforms.zip m2k.plan $ cat m2k.plan ``` + ```yaml apiVersion: move2kube.konveyor.io/v1alpha1 kind: Plan metadata: - name: myproject + name: myproject spec: - sourceDir: language-platforms - services: + sourceDir: language-platforms + services: ``` + {{%expand "Click to see the rest of the yaml."%}} + ```yaml golang: - transformerName: Golang-Dockerfile @@ -218,14 +225,15 @@ WinSLWebApp-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/wind WinWebApp-Dockerfile: m2kassets/built-in/transformers/dockerfilegenerator/windows/winweb/winweb.yaml ZuulAnalyser: m2kassets/built-in/transformers/dockerfilegenerator/java/zuul/zuulanalyser.yaml ``` + {{% /expand%}} 4. Run the transformation using `move2kube transform` to perform the transformation according to the generated plan. By default Move2Kube looks for a plan file in the current directory. Specify the path to a different plan file using the `-p` flag. During transformation Move2Kube will ask several questions to help guide the transformation process. For most questions accept the default answers. Some questions to watch out for are: -* The container registry and namespace to use. A container registry is where all the images are stored (Example: Quay, Docker Hub, etc.). -* The ingress hostname and ingress TLS secret. If deploying to MiniKube, give `localhost` as the ingress host and leave the TLS secret blank. +- The container registry and namespace to use. A container registry is where all the images are stored (Example: Quay, Docker Hub, etc.). +- The ingress hostname and ingress TLS secret. If deploying to MiniKube, give `localhost` as the ingress host and leave the TLS secret blank. For all other questions accept the default answers by pressing `Enter` for each. @@ -242,24 +250,26 @@ Hints: golang, myproject-python, nodejs, rust, simplewebapp, myproject-django, myproject-java-gradle, myproject-java-gradle-war, myproject-java-maven-war, myproject-php, ruby INFO[0009] Starting Plan Transformation ``` + {{%expand "Click to see the remaining questions and output."%}} + ``` -INFO[0009] Iteration 1 +INFO[0009] Iteration 1 INFO[0009] Iteration 2 - 11 artifacts to process INFO[0009] Transformer Maven processing 1 artifacts INFO[0009] Transformer WarRouter processing 2 artifacts ? Select the transformer to use for service simplewebapp Tomcat -INFO[0014] Transformer WarRouter Done -INFO[0014] Transformer Maven Done +INFO[0014] Transformer WarRouter Done +INFO[0014] Transformer Maven Done INFO[0014] Transformer PHP-Dockerfile processing 1 artifacts -INFO[0014] Transformer PHP-Dockerfile Done +INFO[0014] Transformer PHP-Dockerfile Done INFO[0014] Transformer Nodejs-Dockerfile processing 1 artifacts ? Enter the port to be exposed for the service nodejs: Hints: [The service nodejs will be exposed to the specified port] 8080 -INFO[0016] Transformer Nodejs-Dockerfile Done +INFO[0016] Transformer Nodejs-Dockerfile Done INFO[0016] Transformer Ruby-Dockerfile processing 1 artifacts ? Select port to be exposed for the service ruby : Hints: @@ -272,20 +282,20 @@ INFO[0017] Transformer WarRouter processing 3 artifacts Tomcat ? Select the transformer to use for service myproject-java-maven-war Tomcat -INFO[0020] Transformer WarRouter Done +INFO[0020] Transformer WarRouter Done INFO[0020] Transformer WarAnalyser Done INFO[0020] Transformer Golang-Dockerfile processing 1 artifacts ? Select ports to be exposed for the service golang : Hints: [Select Other if you want to add more ports] 8080 -INFO[0021] Transformer Golang-Dockerfile Done +INFO[0021] Transformer Golang-Dockerfile Done INFO[0021] Transformer Gradle processing 1 artifacts ? Select port to be exposed for the service myproject-java-gradle : Hints: [Select Other if you want to expose the service myproject-java-gradle to some other port] 8080 -INFO[0022] Transformer Gradle Done +INFO[0022] Transformer Gradle Done INFO[0022] Transformer Rust-Dockerfile processing 1 artifacts ? Select port to be exposed for the service rust : Hints: @@ -301,7 +311,7 @@ Hints: Hints: [Select Other if you want to expose the service myproject-python to some other port] 8080 -INFO[0024] Transformer Python-Dockerfile Done +INFO[0024] Transformer Python-Dockerfile Done INFO[0024] Created 16 pathMappings and 20 artifacts. Total Path Mappings : 16. Total Artifacts : 11. INFO[0024] Iteration 3 - 20 artifacts to process INFO[0024] Transformer DockerfileImageBuildScript processing 8 artifacts @@ -309,15 +319,15 @@ INFO[0024] Transformer DockerfileImageBuildScript processing 8 artifacts Hints: [The container runtime selected will be used in the scripts] docker -INFO[0028] Transformer DockerfileImageBuildScript Done -INFO[0028] Transformer Jar processing 1 artifacts +INFO[0028] Transformer DockerfileImageBuildScript Done +INFO[0028] Transformer Jar processing 1 artifacts INFO[0028] Transformer Jar Done INFO[0028] Transformer DockerfileParser processing 7 artifacts INFO[0028] Transformer ZuulAnalyser processing 2 artifacts INFO[0028] Transformer ZuulAnalyser Done INFO[0028] Transformer DockerfileParser Done INFO[0028] Transformer Tomcat processing 4 artifacts -INFO[0028] Transformer Tomcat Done +INFO[0028] Transformer Tomcat Done INFO[0028] Created 11 pathMappings and 20 artifacts. Total Path Mappings : 27. Total Artifacts : 31. INFO[0028] Iteration 4 - 20 artifacts to process INFO[0028] Transformer ClusterSelector processing 2 artifacts @@ -379,21 +389,21 @@ Hints: Hints: [Leave empty to use http] -INFO[0049] Transformer Tekton Done +INFO[0049] Transformer Tekton Done INFO[0049] Transformer ClusterSelector processing 2 artifacts INFO[0049] Transformer ClusterSelector Done -INFO[0049] Transformer Knative processing 2 artifacts +INFO[0049] Transformer Knative processing 2 artifacts INFO[0050] Transformer Knative Done INFO[0050] Transformer ComposeGenerator processing 2 artifacts INFO[0050] Transformer ComposeGenerator Done INFO[0050] Transformer ClusterSelector processing 2 artifacts INFO[0050] Transformer ClusterSelector Done INFO[0050] Transformer Kubernetes processing 2 artifacts -INFO[0050] Transformer Kubernetes Done +INFO[0050] Transformer Kubernetes Done INFO[0050] Transformer ContainerImagesPushScriptGenerator processing 2 artifacts INFO[0050] Transformer ContainerImagesPushScriptGenerator Done INFO[0050] Transformer DockerfileImageBuildScript processing 5 artifacts -INFO[0050] Transformer DockerfileImageBuildScript Done +INFO[0050] Transformer DockerfileImageBuildScript Done INFO[0050] Transformer DockerfileParser processing 5 artifacts INFO[0050] Transformer ZuulAnalyser processing 2 artifacts INFO[0050] Transformer ZuulAnalyser Done @@ -428,31 +438,32 @@ INFO[0054] Transformer ReadMeGenerator processing 5 artifacts INFO[0054] Transformer ReadMeGenerator Done INFO[0054] Transformer ClusterSelector processing 2 artifacts INFO[0054] Transformer ClusterSelector Done -INFO[0054] Transformer Knative processing 2 artifacts +INFO[0054] Transformer Knative processing 2 artifacts INFO[0055] Transformer Knative Done INFO[0055] Transformer ClusterSelector processing 2 artifacts INFO[0055] Transformer ClusterSelector Done INFO[0055] Transformer Tekton processing 2 artifacts -INFO[0055] Transformer Tekton Done +INFO[0055] Transformer Tekton Done INFO[0055] Transformer ClusterSelector processing 2 artifacts INFO[0055] Transformer ClusterSelector Done INFO[0055] Transformer Kubernetes processing 2 artifacts -INFO[0055] Transformer Kubernetes Done +INFO[0055] Transformer Kubernetes Done INFO[0055] Transformer ComposeGenerator processing 2 artifacts INFO[0055] Transformer ComposeGenerator Done INFO[0055] Transformer ContainerImagesPushScriptGenerator processing 2 artifacts INFO[0055] Transformer ContainerImagesPushScriptGenerator Done INFO[0055] Transformer Parameterizer processing 4 artifacts -INFO[0055] Transformer Parameterizer Done +INFO[0055] Transformer Parameterizer Done INFO[0056] Created 60 pathMappings and 7 artifacts. Total Path Mappings : 127. Total Artifacts : 72. INFO[0056] Iteration 6 - 7 artifacts to process INFO[0056] Transformer Parameterizer processing 4 artifacts -INFO[0056] Transformer Parameterizer Done +INFO[0056] Transformer Parameterizer Done INFO[0056] Transformer ReadMeGenerator processing 5 artifacts INFO[0056] Transformer ReadMeGenerator Done INFO[0056] Plan Transformation done INFO[0056] Transformed target artifacts can be found at [/Users/user/Desktop/tutorial/myproject]. ``` + {{% /expand%}} After the questions are finished wait a few minutes for it to finish processing and generated a directory called `myproject`. The name of the output directory is the same as the project name (by default `myproject`). The project name can be changed using the `-n` flag. @@ -492,7 +503,9 @@ $ tree │ │ │ └── myproject-tekton-triggers-admin-serviceaccount.yaml │ │ └── tekton-parameterized ``` + {{%expand "Click to see the rest of the tree."%}} + ```console │ │ ├── helm-chart │ │ │ └── myproject @@ -782,9 +795,10 @@ $ tree 59 directories, 241 files ``` + {{% /expand%}} -The CLI has created Kubernetes YAMLs which are stored inside the `deploy/yamls` directory. For each of the directories and the services identified, it has created the deployment artifacts, service artifacts, and the ingress as required. The `scripts` directory contains the scripts for building the images for the applications using Dockerfiles. +The CLI has created Kubernetes YAMLs which are stored inside the `deploy/yamls` directory. For each of the directories and the services identified, it has created the deployment artifacts, service artifacts, and the ingress as required. The `scripts` directory contains the scripts for building the images for the applications using Dockerfiles. Many scripts like `builddockerimages.sh` and `pushimages.sh` are also present inside the directory. It has also created a simple `deploy/compose/docker-compose.yaml` to test the images locally. It has also created Tekton artifacts inside the `deploy/cicd/tekton` directory that are required if you want to use Tekton as your CI/CD pipeline. @@ -820,7 +834,9 @@ $ ./builddockerimages.sh => [internal] load build context 0.0s => => transferring context: 19.68kB 0.0s ``` + {{%expand "Click to see the remaining output."%}} + ```console => CACHED [2/6] RUN microdnf update && microdnf install -y java-11-openjdk-devel wget tar && microdnf clean all 0.0s => CACHED [3/6] WORKDIR /usr/local 0.0s @@ -890,6 +906,7 @@ Use 'docker scan' to run Snyk tests against images to find vulnerabilities and l => => naming to docker.io/library/nodejs 0.0s ... ``` + {{% /expand%}} 3. Log in to a container registry from the terminal. Refer to the instructions for [Quay](https://docs.quay.io/solution/getting-started.html) and [Docker Hub](https://docs.docker.com/engine/reference/commandline/login/) @@ -909,7 +926,9 @@ e262751a7e43: Layer already exists 3ba8c926eef9: Layer already exists 352ba846236b: Layer already exists ``` + {{%expand "Click to see the remaining output."%}} + ```console latest: digest: sha256:d76b1dc841442b0e31c533c1e2419b3ae670de7b4381d4ff1ca2eaf1fbf5dfe6 size: 1999 Using default tag: latest @@ -939,6 +958,7 @@ The push refers to repository [quay.io/move2kube/ruby] 5f70bf18a086: Layer already exists ... ``` + {{% /expand%}} 5. Deploy the applications using `kubectl apply -f ./deploy/yamls`. @@ -971,7 +991,6 @@ deployment.apps/simplewebapp created service/simplewebapp created ``` - Now all applications are accessible on the cluster. 6. Get the ingress to see the URLs where the apps have been deployed to `kubectl get ingress myproject -o yaml`. @@ -981,9 +1000,9 @@ Now all applications are accessible on the cluster. ```console $ 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 k8s.gcr.io/ingress-nginx/controller:v1.0.4 -▪ Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1 -▪ Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.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 @@ -1001,4 +1020,4 @@ Password: A very diverse source environment like the [language-platforms](https://github.com/konveyor/move2kube-demos/tree/main/samples/language-platforms) sample, which has multiple apps in different languages, but can simply containerize and deploy them to Kubernetes. A Move2Kube UI tool which has all the same features as the CLI. -[Source](https://github.com/konveyor/konveyor.github.io/blob/main/content/Move2Kube/Tutorials/usingCLI.md) \ No newline at end of file +[Source](https://github.com/konveyor/konveyor.github.io/blob/main/content/Move2Kube/Tutorials/usingCLI.md)