diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index ecaf03b9f..000000000
--- a/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-internal/assets/constants.go -diff
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 6a5566479..f1f4c4c54 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -24,8 +24,8 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- - OS: [e.g. iOS]
- - Version [e.g. 22]. Move2Kube version should return it.
+ - OS: [e.g. RHEL]
+ - Version [e.g. 22]. `move2kube version` should return it.
**Additional context**
Add any other context about the problem here.
diff --git a/Dockerfile b/Dockerfile
index 6101a20fd..d770343f1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-# Copyright IBM Corporation 2020
+# Copyright IBM Corporation 2020, 2021
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,11 +13,11 @@
# limitations under the License.
# Builder image
-FROM registry.fedoraproject.org/fedora:latest AS build_base
+FROM registry.access.redhat.com/ubi8/ubi:latest AS build_base
WORKDIR /temp
-RUN dnf install -y git make findutils upx \
- && dnf clean all \
- && rm -rf /var/cache/yum
+
+RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
+RUN dnf install -y git make upx
ENV GOPATH=/go
RUN mkdir -p $GOPATH/src $GOPATH/bin && chmod -R 777 $GOPATH
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
@@ -44,66 +44,9 @@ RUN cp bin/move2kube /bin/move2kube
### Run image ###
-FROM registry.fedoraproject.org/fedora:latest
-RUN curl -o /usr/local/bin/operator-sdk -LJO 'https://github.com/operator-framework/operator-sdk/releases/download/v1.3.0/operator-sdk_linux_amd64' \
+FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
+RUN curl -o /usr/local/bin/operator-sdk -LJO 'https://github.com/operator-framework/operator-sdk/releases/download/v1.9.0/operator-sdk_linux_amd64' \
&& chmod +x /usr/local/bin/operator-sdk
-# Install utils
-RUN dnf install -y findutils podman \
- && dnf clean all \
- && rm -rf /var/cache/yum
-COPY containerconfig/* /etc/containers/
-
-
-###################################################
-#### Setting up environment for Containerizers ####
-###################################################
-
-ENV M2KCONTAINERIZER_ENV_AVAILABLE=true
-
-# Install Java, python and utils
-RUN dnf install -y \
- java-1.8.0-openjdk \
- java-1.8.0-openjdk-devel \
- unzip \
- python38 \
- && dnf clean all \
- && rm -rf /var/cache/yum \
- which
-ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk/
-
-# Downloading and installing Maven
-ENV MAVEN_VERSION 3.6.3
-ENV BASE_URL https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries
-RUN mkdir -p /usr/share/maven /usr/share/maven/ref \
- && echo "Downloading maven" \
- && curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \
- && echo "Unziping maven" \
- && tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 \
- && echo "Cleaning and setting links" \
- && rm -f /tmp/apache-maven.tar.gz \
- && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
-ENV MAVEN_HOME /usr/share/maven
-ENV MAVEN_CONFIG "$HOME/.m2"
-
-# Downloading and installing Gradle
-ENV GRADLE_VERSION 4.0.1
-ENV GRADLE_HOME /usr/bin/gradle
-ENV GRADLE_USER_HOME /cache
-ENV PATH $PATH:$GRADLE_HOME/bin
-ENV GRADLE_BASE_URL https://services.gradle.org/distributions
-RUN mkdir -p /usr/share/gradle /usr/share/gradle/ref \
- && echo "Downloading gradle hash" \
- && curl -fsSL -o /tmp/gradle.zip ${GRADLE_BASE_URL}/gradle-${GRADLE_VERSION}-bin.zip \
- && echo "Unziping gradle" \
- && unzip -d /usr/share/gradle /tmp/gradle.zip \
- && echo "Cleaning and setting links" \
- && rm -f /tmp/gradle.zip \
- && ln -s /usr/share/gradle/gradle-${GRADLE_VERSION} /usr/bin/gradle
-
-####################################################
-# Setup Move2Kube
-####################################################
-
COPY --from=build_base /bin/move2kube /bin/move2kube
VOLUME ["/workspace"]
#"/var/run/docker.sock" needs to be mounted for CNB containerization to use docker
diff --git a/README.md b/README.md
index ff8859d8a..fc217db63 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,13 @@
[](https://github.com/konveyor/move2kube/actions?query=workflow%3ABuild)
[](https://quay.io/repository/konveyor/move2kube)
[](https://www.apache.org/licenses/LICENSE-2.0.html)
-[](https://github.com/konveyor/move2kube/pulls)
[](https://goreportcard.com/report/github.com/konveyor/move2kube)
[](https://kubernetes.slack.com/archives/CR85S82A2)
+
# Move2Kube
-Move2Kube is a command-line tool that accelerates the process of re-platforming to Kubernetes/Openshift. It does so by analysing the environment and source artifacts, and asking guidance from the user when required.
+Move2Kube is a command-line tool that accelerates the process of re-platforming to Kubernetes/Openshift. It does so by analysing the environment and source artifacts, and asking guidance from the user when required. It allows customizations to enable generating the directory structure and artifacts in the format required for your project.

@@ -39,7 +39,7 @@ brew install move2kube
## UI
-We also provide a UI version of Move2Kube
+To bring up UI version:
* Change directory to an empty directory using say, `mkdir -p workspace && cd workspace`
* Run `docker run -p 8080:8080 -v $PWD:/workspace -v /var/run/docker.sock:/var/run/docker.sock -it quay.io/konveyor/move2kube-aio:latest`
@@ -47,22 +47,14 @@ We also provide a UI version of Move2Kube
## Usage
-### Simple Usage
-
`move2kube transform -s src` , where src is the folder containing the source artifacts.
-### Involved Usage
-
-
-
Checkout the [Getting started](https://move2kube.konveyor.io/docs/getting-started) guide and [Tutorials](https://move2kube.konveyor.io/docs/tutorial) for more information.
-## Prerequisites
-
-* Docker [(MAC](https://docs.docker.com/desktop/)[/Ubuntu](https://docs.docker.com/engine/install/ubuntu/)[/Windows WSL)](https://docs.docker.com/docker-for-windows/wsl/) - If Cloud Native Buildpack (CNB) support is required.
-
## Development environment setup
+To browse code [](https://open.vscode.dev/konveyor/move2kube)
+
1. Obtain a recent version of `golang`. Known to work with `1.16`.
1. Ensure `$GOPATH` is set. If it's not set:
1. `mkdir ~/go`
@@ -78,14 +70,13 @@ Checkout the [Getting started](https://move2kube.konveyor.io/docs/getting-starte
| Source | Artifact available | Features supported |
|:-------|:-------------------|:-------------------|
-| Cloud Foundry | Manifest files | Containerization options from buildpacks, Deployment artifacts |
-| Cloud Foundry | Manifest files, Source code | Containerization options based on buildpack/source code, Deployment artifacts |
-| Cloud Foundry | Manifest files, Source code, Access to running instance | Containerization options based on buildpack/source code, Deployment artifacts, Metadata from runtime |
-| Cloud Foundry | Access to running instance | Metadata from runtime, Containerization options based on buildpack, Deployment artifacts |
+| Cloud Foundry | Manifest files, Source code | Containerization options based on source code, Deployment artifacts |
+| Cloud Foundry | Manifest files, Source code, Access to running instance | Containerization options based on source code, Deployment artifacts, Metadata from runtime |
+| Dockerfile | Dockerfile | Deployment artifacts, CI/CD pipeline artifacts |
| Docker Compose/Swarm | Docker compose files | Deployment artifacts |
-| Docker Compose/Swarm | Docker compose files, Docker images | Deployment artifacts, Ability to enhance images to run in secure environments like Openshift. |
-| Source Directories | Source code with no source metadata | Containerization options based on source code, Deployment artifacts |
-| Any source | Access to target cluster | Ability to create artifacts customized for that particular cluster with the most preferred GroupVersion for the kind. |
+| Docker Compose/Swarm | Docker compose files, Docker images | Deployment artifacts, CI/CD pipeline artifacts |
+| Source Directories | Source code with no source metadata | Containerization options based on source code, Deployment artifacts, CI/CD artifacts |
+| Kubernetes Yamls | Kubernetes Yamls | Parameterize and create Helm chart, Kustomize yamls and Openshift templates. |
## Output
@@ -96,15 +87,11 @@ Checkout the [Getting started](https://move2kube.konveyor.io/docs/getting-starte
* Deployment artifacts
* Kubernetes/Openshift Yamls
* Helm charts
+ * Kustomize
+ * Openshift Templates
* Operator
* Docker compose
-## Move2Kube Demo
-* A short demo of using Move2Kube end-to-end, i.e., starting from the generation of the target deployment artifacts using the source artifacts, to finally deploying the applications on Kubernetes using the generated target artifacts, can be watched in the below link.
-
- 
-
## Discussion
-* Check out the [document guides](./docs) to extend Move2Kube.
* For any questions reach out to us on any of the communication channels given on our website https://move2kube.konveyor.io/
diff --git a/assets/inbuilt/configs/dc.yaml b/assets/inbuilt/presets/dc.yaml
similarity index 100%
rename from assets/inbuilt/configs/dc.yaml
rename to assets/inbuilt/presets/dc.yaml
diff --git a/cmd/move2kube/collect.go b/cmd/move2kube/collect.go
index 6dd7fa5f1..8d7799df2 100644
--- a/cmd/move2kube/collect.go
+++ b/cmd/move2kube/collect.go
@@ -21,7 +21,7 @@ import (
"path/filepath"
"strings"
- "github.com/konveyor/move2kube/api"
+ "github.com/konveyor/move2kube/lib"
"github.com/konveyor/move2kube/types"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
@@ -61,9 +61,9 @@ func collectHandler(flags collectFlags) {
}
outpath = filepath.Join(filepath.Clean(outpath), types.AppNameShort+"_collect")
if annotations == "" {
- api.Collect(srcpath, outpath, []string{})
+ lib.Collect(srcpath, outpath, []string{})
} else {
- api.Collect(srcpath, outpath, strings.Split(annotations, ","))
+ lib.Collect(srcpath, outpath, strings.Split(annotations, ","))
}
logrus.Infof("Collect Output in [%s]. Copy this directory into the source directory to be used for planning.", outpath)
}
diff --git a/cmd/move2kube/parameterize.go b/cmd/move2kube/parameterize.go
index 205abd5a6..7ef78aa31 100644
--- a/cmd/move2kube/parameterize.go
+++ b/cmd/move2kube/parameterize.go
@@ -20,8 +20,8 @@ import (
"os"
"path/filepath"
- "github.com/konveyor/move2kube/api"
"github.com/konveyor/move2kube/internal/common"
+ "github.com/konveyor/move2kube/lib"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
@@ -62,7 +62,7 @@ func parameterizeHandler(_ *cobra.Command, flags parameterizeFlags) {
startQA(flags.qaflags)
// Parameterization
- filesWritten, err := api.Parameterize(flags.srcpath, flags.customizationsPath, flags.outpath)
+ filesWritten, err := lib.Parameterize(flags.srcpath, flags.customizationsPath, flags.outpath)
if err != nil {
logrus.Fatalf("Failed to apply all the parameterizations. Error: %q", err)
}
diff --git a/cmd/move2kube/plan.go b/cmd/move2kube/plan.go
index 5eb4a864c..11748a115 100644
--- a/cmd/move2kube/plan.go
+++ b/cmd/move2kube/plan.go
@@ -21,8 +21,8 @@ import (
"path/filepath"
"strings"
- "github.com/konveyor/move2kube/api"
"github.com/konveyor/move2kube/internal/common"
+ "github.com/konveyor/move2kube/lib"
"github.com/konveyor/move2kube/qaengine"
plantypes "github.com/konveyor/move2kube/types/plan"
"github.com/sirupsen/logrus"
@@ -81,12 +81,12 @@ func planHandler(flags planFlags) {
}
qaengine.StartEngine(true, 0, true)
qaengine.SetupConfigFile("", flags.setconfigs, flags.configs, flags.preSets)
- p := api.CreatePlan(srcpath, "", customizationsPath, name)
+ p := lib.CreatePlan(srcpath, "", customizationsPath, name)
if err = plantypes.WritePlan(planfile, p); err != nil {
logrus.Errorf("Unable to write plan file (%s) : %s", planfile, err)
return
}
- api.Destroy()
+ lib.Destroy()
logrus.Infof("Plan can be found at [%s].", planfile)
}
diff --git a/cmd/move2kube/transform.go b/cmd/move2kube/transform.go
index 2a8969c27..433029001 100644
--- a/cmd/move2kube/transform.go
+++ b/cmd/move2kube/transform.go
@@ -20,8 +20,8 @@ import (
"os"
"path/filepath"
- "github.com/konveyor/move2kube/api"
"github.com/konveyor/move2kube/internal/common"
+ "github.com/konveyor/move2kube/lib"
"github.com/konveyor/move2kube/types/plan"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
@@ -94,7 +94,7 @@ func transformHandler(cmd *cobra.Command, flags transformFlags) {
}
startQA(flags.qaflags)
logrus.Debugf("Creating a new plan.")
- p = api.CreatePlan(flags.srcpath, flags.outpath, flags.customizationsPath, flags.name)
+ p = lib.CreatePlan(flags.srcpath, flags.outpath, flags.customizationsPath, flags.name)
} else {
logrus.Infof("Detected a plan file at path %s. Will transform using this plan.", flags.planfile)
rootDir := ""
@@ -130,10 +130,10 @@ func transformHandler(cmd *cobra.Command, flags transformFlags) {
}
startQA(flags.qaflags)
}
- p = api.CuratePlan(p, flags.outpath)
- api.Transform(p, flags.outpath)
+ p = lib.CuratePlan(p, flags.outpath)
+ lib.Transform(p, flags.outpath)
logrus.Infof("Transformed target artifacts can be found at [%s].", flags.outpath)
- api.Destroy()
+ lib.Destroy()
}
func getTransformCommand() *cobra.Command {
diff --git a/cmd/move2kube/validate.go b/cmd/move2kube/validate.go
index 81ac147d8..fcf20949f 100644
--- a/cmd/move2kube/validate.go
+++ b/cmd/move2kube/validate.go
@@ -19,7 +19,7 @@ package main
import (
"path/filepath"
- "github.com/konveyor/move2kube/api"
+ "github.com/konveyor/move2kube/lib"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
@@ -38,7 +38,7 @@ func validateHandler(flags validateFlags) {
if err != nil {
logrus.Fatalf("Failed to make the directory path %q absolute. Error: %q", artifactspath, err)
}
- api.PrintValidate(artifactspath)
+ lib.PrintValidate(artifactspath)
}
func getValidateCommand() *cobra.Command {
diff --git a/cmd/move2kube/version.go b/cmd/move2kube/version.go
index 155ea0bec..5a78dea31 100644
--- a/cmd/move2kube/version.go
+++ b/cmd/move2kube/version.go
@@ -19,7 +19,7 @@ package main
import (
"fmt"
- api "github.com/konveyor/move2kube/api"
+ api "github.com/konveyor/move2kube/lib"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
diff --git a/containerconfig/containers.conf b/containerconfig/containers.conf
deleted file mode 100644
index 8692f4da3..000000000
--- a/containerconfig/containers.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-[engine]
-cgroup_manager = "cgroupfs"
-events_logger = "file"
\ No newline at end of file
diff --git a/containerconfig/storage.conf b/containerconfig/storage.conf
deleted file mode 100644
index f5bf4d3b3..000000000
--- a/containerconfig/storage.conf
+++ /dev/null
@@ -1,192 +0,0 @@
-# This file is is the configuration file for all tools
-# that use the containers/storage library.
-# See man 5 containers-storage.conf for more information
-# The "container storage" table contains all of the server options.
-[storage]
-
-# Default Storage Driver
-driver = "overlay"
-
-# Temporary storage location
-runroot = "/var/run/containers/storage"
-
-# Primary Read/Write location of container storage
-graphroot = "/var/lib/containers/storage"
-
-# Storage path for rootless users
-#
-# rootless_storage_path = "$HOME/.local/share/containers/storage"
-
-[storage.options]
-# Storage options to be passed to underlying storage drivers
-
-# AdditionalImageStores is used to pass paths to additional Read/Only image stores
-# Must be comma separated list.
-additionalimagestores = [
-]
-
-# Remap-UIDs/GIDs is the mapping from UIDs/GIDs as they should appear inside of
-# a container, to the UIDs/GIDs as they should appear outside of the container,
-# and the length of the range of UIDs/GIDs. Additional mapped sets can be
-# listed and will be heeded by libraries, but there are limits to the number of
-# mappings which the kernel will allow when you later attempt to run a
-# container.
-#
-# remap-uids = 0:1668442479:65536
-# remap-gids = 0:1668442479:65536
-
-# Remap-User/Group is a user name which can be used to look up one or more UID/GID
-# ranges in the /etc/subuid or /etc/subgid file. Mappings are set up starting
-# with an in-container ID of 0 and then a host-level ID taken from the lowest
-# range that matches the specified name, and using the length of that range.
-# Additional ranges are then assigned, using the ranges which specify the
-# lowest host-level IDs first, to the lowest not-yet-mapped in-container ID,
-# until all of the entries have been used for maps.
-#
-# remap-user = "containers"
-# remap-group = "containers"
-
-# Root-auto-userns-user is a user name which can be used to look up one or more UID/GID
-# ranges in the /etc/subuid and /etc/subgid file. These ranges will be partitioned
-# to containers configured to create automatically a user namespace. Containers
-# configured to automatically create a user namespace can still overlap with containers
-# having an explicit mapping set.
-# This setting is ignored when running as rootless.
-# root-auto-userns-user = "storage"
-#
-# Auto-userns-min-size is the minimum size for a user namespace created automatically.
-# auto-userns-min-size=1024
-#
-# Auto-userns-max-size is the minimum size for a user namespace created automatically.
-# auto-userns-max-size=65536
-
-[storage.options.overlay]
-# ignore_chown_errors can be set to allow a non privileged user running with
-# a single UID within a user namespace to run containers. The user can pull
-# and use any image even those with multiple uids. Note multiple UIDs will be
-# squashed down to the default uid in the container. These images will have no
-# separation between the users in the container. Only supported for the overlay
-# and vfs drivers.
-#ignore_chown_errors = "false"
-
-# Path to an helper program to use for mounting the file system instead of mounting it
-# directly.
-#mount_program = "/usr/bin/fuse-overlayfs"
-
-# mountopt specifies comma separated list of extra mount options
-mountopt = "nodev"
-
-# Set to skip a PRIVATE bind mount on the storage home directory.
-# skip_mount_home = "false"
-
-# Size is used to set a maximum size of the container image.
-# size = ""
-
-# ForceMask specifies the permissions mask that is used for new files and
-# directories.
-#
-# The values "shared" and "private" are accepted.
-# Octal permission masks are also accepted.
-#
-# "": No value specified.
-# All files/directories, get set with the permissions identified within the
-# image.
-# "private": it is equivalent to 0700.
-# All files/directories get set with 0700 permissions. The owner has rwx
-# access to the files. No other users on the system can access the files.
-# This setting could be used with networked based homedirs.
-# "shared": it is equivalent to 0755.
-# The owner has rwx access to the files and everyone else can read, access
-# and execute them. This setting is useful for sharing containers storage
-# with other users. For instance have a storage owned by root but shared
-# to rootless users as an additional store.
-# NOTE: All files within the image are made readable and executable by any
-# user on the system. Even /etc/shadow within your image is now readable by
-# any user.
-#
-# OCTAL: Users can experiment with other OCTAL Permissions.
-#
-# Note: The force_mask Flag is an experimental feature, it could change in the
-# future. When "force_mask" is set the original permission mask is stored in
-# the "user.containers.override_stat" xattr and the "mount_program" option must
-# be specified. Mount programs like "/usr/bin/fuse-overlayfs" present the
-# extended attribute permissions to processes within containers rather then the
-# "force_mask" permissions.
-#
-# force_mask = ""
-
-[storage.options.thinpool]
-# Storage Options for thinpool
-
-# autoextend_percent determines the amount by which pool needs to be
-# grown. This is specified in terms of % of pool size. So a value of 20 means
-# that when threshold is hit, pool will be grown by 20% of existing
-# pool size.
-# autoextend_percent = "20"
-
-# autoextend_threshold determines the pool extension threshold in terms
-# of percentage of pool size. For example, if threshold is 60, that means when
-# pool is 60% full, threshold has been hit.
-# autoextend_threshold = "80"
-
-# basesize specifies the size to use when creating the base device, which
-# limits the size of images and containers.
-# basesize = "10G"
-
-# blocksize specifies a custom blocksize to use for the thin pool.
-# blocksize="64k"
-
-# directlvm_device specifies a custom block storage device to use for the
-# thin pool. Required if you setup devicemapper.
-# directlvm_device = ""
-
-# directlvm_device_force wipes device even if device already has a filesystem.
-# directlvm_device_force = "True"
-
-# fs specifies the filesystem type to use for the base device.
-# fs="xfs"
-
-# log_level sets the log level of devicemapper.
-# 0: LogLevelSuppress 0 (Default)
-# 2: LogLevelFatal
-# 3: LogLevelErr
-# 4: LogLevelWarn
-# 5: LogLevelNotice
-# 6: LogLevelInfo
-# 7: LogLevelDebug
-# log_level = "7"
-
-# min_free_space specifies the min free space percent in a thin pool require for
-# new device creation to succeed. Valid values are from 0% - 99%.
-# Value 0% disables
-# min_free_space = "10%"
-
-# mkfsarg specifies extra mkfs arguments to be used when creating the base
-# device.
-# mkfsarg = ""
-
-# metadata_size is used to set the `pvcreate --metadatasize` options when
-# creating thin devices. Default is 128k
-# metadata_size = ""
-
-# Size is used to set a maximum size of the container image.
-# size = ""
-
-# use_deferred_removal marks devicemapper block device for deferred removal.
-# If the thinpool is in use when the driver attempts to remove it, the driver
-# tells the kernel to remove it as soon as possible. Note this does not free
-# up the disk space, use deferred deletion to fully remove the thinpool.
-# use_deferred_removal = "True"
-
-# use_deferred_deletion marks thinpool device for deferred deletion.
-# If the device is busy when the driver attempts to delete it, the driver
-# will attempt to delete device every 30 seconds until successful.
-# If the program using the driver exits, the driver will continue attempting
-# to cleanup the next time the driver is used. Deferred deletion permanently
-# deletes the device and all data stored in device will be lost.
-# use_deferred_deletion = "True"
-
-# xfs_nospace_max_retries specifies the maximum number of retries XFS should
-# attempt to complete IO when ENOSPC (no space) error is returned by
-# underlying storage device.
-# xfs_nospace_max_retries = "0"
diff --git a/docs/README.md b/docs/README.md
deleted file mode 100644
index 1ee84767a..000000000
--- a/docs/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-# Document guides to extend Move2Kube
-
-- Adding docker containerization support for a new language-platform: `docker-containerization.md`
-
diff --git a/docs/docker-containerization.md b/docs/docker-containerization.md
deleted file mode 100644
index f047ab93e..000000000
--- a/docs/docker-containerization.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Dockerfile Containerization
-
-## Description
-
-We elaborate on how new language-platform support could be added using docker file containerization with a running example of one of the samples (namely, `java-maven`).
-
-## Steps
-
-1. Follow the steps mentioned [here](https://github.com/konveyor/move2kube-demos/blob/main/tutorials/dockerfile-containerization.md) to create and test the dockerfile and script before actually including it in the code.
-2. If tests pass, copy the sample you have used for the new language-platform in:
- ```
- https://github.com/konveyor/move2kube/tree/main/samples
- ```
-3. Create a directory for the new language-platform in:
- ```
- https://github.com/konveyor/move2kube/tree/main/internal/assets/dockerfiles
- ```
- and add the **dockerfile template** and `m2kdfdetect.sh` to it.
-4. Perform the following steps to build the code:
- ```
- make generate
- make build
- ```
-5. Repeat the steps in **Generate and test** section from this [document](https://github.com/konveyor/move2kube-demos/blob/main/tutorials/dockerfile-containerization.md) to test the dockerfile and script created from previous steps.
-6. Updates any related test cases for the above changes.
-7. Once the test passes, commit the code with sign-off and create a pull request by following steps specified [here](https://github.com/konveyor/move2kube/blob/main/contributing.md).
diff --git a/imgs/e2e-flow.svg b/imgs/e2e-flow.svg
deleted file mode 100644
index 132d3a638..000000000
--- a/imgs/e2e-flow.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/imgs/usage.png b/imgs/usage.png
deleted file mode 100644
index ab5bfcb03..000000000
Binary files a/imgs/usage.png and /dev/null differ
diff --git a/api/collector.go b/lib/collector.go
similarity index 99%
rename from api/collector.go
rename to lib/collector.go
index 09a4c5c69..a5be3a827 100644
--- a/api/collector.go
+++ b/lib/collector.go
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package api
+package lib
import (
"os"
diff --git a/api/parameterizer.go b/lib/parameterizer.go
similarity index 99%
rename from api/parameterizer.go
rename to lib/parameterizer.go
index 431df19ad..0a7084434 100644
--- a/api/parameterizer.go
+++ b/lib/parameterizer.go
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package api
+package lib
import (
"path/filepath"
diff --git a/api/parameterizer_test.go b/lib/parameterizer_test.go
similarity index 95%
rename from api/parameterizer_test.go
rename to lib/parameterizer_test.go
index e61ce5d5a..aecf5ecb1 100644
--- a/api/parameterizer_test.go
+++ b/lib/parameterizer_test.go
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package api_test
+package lib_test
import (
"io/ioutil"
@@ -23,7 +23,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
- "github.com/konveyor/move2kube/api"
+ "github.com/konveyor/move2kube/lib"
log "github.com/sirupsen/logrus"
)
@@ -39,7 +39,7 @@ func TestGettingAndParameterizingResources(t *testing.T) {
k8sResourcesPath := filepath.Join(baseDir, "k8s-resources")
outputPath := t.TempDir()
- filesWritten, err := api.Parameterize(k8sResourcesPath, parameterizersPath, outputPath)
+ filesWritten, err := lib.Parameterize(k8sResourcesPath, parameterizersPath, outputPath)
if err != nil {
t.Fatalf("Failed to apply all the parameterizations. Error: %q", err)
}
diff --git a/api/planner.go b/lib/planner.go
similarity index 99%
rename from api/planner.go
rename to lib/planner.go
index 400dedfd8..9316953be 100644
--- a/api/planner.go
+++ b/lib/planner.go
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package api
+package lib
import (
"github.com/konveyor/move2kube/internal/common"
diff --git a/api/testdata/k8s-resources/dep-v1.yaml b/lib/testdata/k8s-resources/dep-v1.yaml
similarity index 100%
rename from api/testdata/k8s-resources/dep-v1.yaml
rename to lib/testdata/k8s-resources/dep-v1.yaml
diff --git a/api/testdata/k8s-resources/dep-v1beta1.yaml b/lib/testdata/k8s-resources/dep-v1beta1.yaml
similarity index 100%
rename from api/testdata/k8s-resources/dep-v1beta1.yaml
rename to lib/testdata/k8s-resources/dep-v1beta1.yaml
diff --git a/api/testdata/k8s-resources/namespace-v1.yaml b/lib/testdata/k8s-resources/namespace-v1.yaml
similarity index 100%
rename from api/testdata/k8s-resources/namespace-v1.yaml
rename to lib/testdata/k8s-resources/namespace-v1.yaml
diff --git a/api/testdata/parameterizers/p1.yaml b/lib/testdata/parameterizers/p1.yaml
similarity index 100%
rename from api/testdata/parameterizers/p1.yaml
rename to lib/testdata/parameterizers/p1.yaml
diff --git a/api/testdata/parameterizers/p2.yaml b/lib/testdata/parameterizers/p2.yaml
similarity index 100%
rename from api/testdata/parameterizers/p2.yaml
rename to lib/testdata/parameterizers/p2.yaml
diff --git a/api/testdata/parameterizers/pack.yaml b/lib/testdata/parameterizers/pack.yaml
similarity index 100%
rename from api/testdata/parameterizers/pack.yaml
rename to lib/testdata/parameterizers/pack.yaml
diff --git a/api/testdata/want/helm-chart/myproject/Chart.yaml b/lib/testdata/want/helm-chart/myproject/Chart.yaml
similarity index 100%
rename from api/testdata/want/helm-chart/myproject/Chart.yaml
rename to lib/testdata/want/helm-chart/myproject/Chart.yaml
diff --git a/api/testdata/want/helm-chart/myproject/templates/dep-v1.yaml b/lib/testdata/want/helm-chart/myproject/templates/dep-v1.yaml
similarity index 100%
rename from api/testdata/want/helm-chart/myproject/templates/dep-v1.yaml
rename to lib/testdata/want/helm-chart/myproject/templates/dep-v1.yaml
diff --git a/api/testdata/want/helm-chart/myproject/templates/dep-v1beta1.yaml b/lib/testdata/want/helm-chart/myproject/templates/dep-v1beta1.yaml
similarity index 100%
rename from api/testdata/want/helm-chart/myproject/templates/dep-v1beta1.yaml
rename to lib/testdata/want/helm-chart/myproject/templates/dep-v1beta1.yaml
diff --git a/api/testdata/want/helm-chart/myproject/templates/namespace-v1.yaml b/lib/testdata/want/helm-chart/myproject/templates/namespace-v1.yaml
similarity index 100%
rename from api/testdata/want/helm-chart/myproject/templates/namespace-v1.yaml
rename to lib/testdata/want/helm-chart/myproject/templates/namespace-v1.yaml
diff --git a/api/testdata/want/helm-chart/myproject/values-dev.yaml b/lib/testdata/want/helm-chart/myproject/values-dev.yaml
similarity index 100%
rename from api/testdata/want/helm-chart/myproject/values-dev.yaml
rename to lib/testdata/want/helm-chart/myproject/values-dev.yaml
diff --git a/api/testdata/want/helm-chart/myproject/values-prod.yaml b/lib/testdata/want/helm-chart/myproject/values-prod.yaml
similarity index 100%
rename from api/testdata/want/helm-chart/myproject/values-prod.yaml
rename to lib/testdata/want/helm-chart/myproject/values-prod.yaml
diff --git a/api/testdata/want/helm-chart/myproject/values-staging.yaml b/lib/testdata/want/helm-chart/myproject/values-staging.yaml
similarity index 100%
rename from api/testdata/want/helm-chart/myproject/values-staging.yaml
rename to lib/testdata/want/helm-chart/myproject/values-staging.yaml
diff --git a/api/testdata/want/kustomize/base/dep-v1.yaml b/lib/testdata/want/kustomize/base/dep-v1.yaml
similarity index 100%
rename from api/testdata/want/kustomize/base/dep-v1.yaml
rename to lib/testdata/want/kustomize/base/dep-v1.yaml
diff --git a/api/testdata/want/kustomize/base/dep-v1beta1.yaml b/lib/testdata/want/kustomize/base/dep-v1beta1.yaml
similarity index 100%
rename from api/testdata/want/kustomize/base/dep-v1beta1.yaml
rename to lib/testdata/want/kustomize/base/dep-v1beta1.yaml
diff --git a/api/testdata/want/kustomize/base/kustomization.yaml b/lib/testdata/want/kustomize/base/kustomization.yaml
similarity index 100%
rename from api/testdata/want/kustomize/base/kustomization.yaml
rename to lib/testdata/want/kustomize/base/kustomization.yaml
diff --git a/api/testdata/want/kustomize/base/namespace-v1.yaml b/lib/testdata/want/kustomize/base/namespace-v1.yaml
similarity index 100%
rename from api/testdata/want/kustomize/base/namespace-v1.yaml
rename to lib/testdata/want/kustomize/base/namespace-v1.yaml
diff --git a/api/testdata/want/kustomize/overlays/dev/apps-v1-deployment-nginx.yaml b/lib/testdata/want/kustomize/overlays/dev/apps-v1-deployment-nginx.yaml
similarity index 100%
rename from api/testdata/want/kustomize/overlays/dev/apps-v1-deployment-nginx.yaml
rename to lib/testdata/want/kustomize/overlays/dev/apps-v1-deployment-nginx.yaml
diff --git a/api/testdata/want/kustomize/overlays/dev/extensions-v1beta1-deployment-javaspringapp.yaml b/lib/testdata/want/kustomize/overlays/dev/extensions-v1beta1-deployment-javaspringapp.yaml
similarity index 100%
rename from api/testdata/want/kustomize/overlays/dev/extensions-v1beta1-deployment-javaspringapp.yaml
rename to lib/testdata/want/kustomize/overlays/dev/extensions-v1beta1-deployment-javaspringapp.yaml
diff --git a/api/testdata/want/kustomize/overlays/dev/kustomization.yaml b/lib/testdata/want/kustomize/overlays/dev/kustomization.yaml
similarity index 100%
rename from api/testdata/want/kustomize/overlays/dev/kustomization.yaml
rename to lib/testdata/want/kustomize/overlays/dev/kustomization.yaml
diff --git a/api/testdata/want/kustomize/overlays/prod/apps-v1-deployment-nginx.yaml b/lib/testdata/want/kustomize/overlays/prod/apps-v1-deployment-nginx.yaml
similarity index 100%
rename from api/testdata/want/kustomize/overlays/prod/apps-v1-deployment-nginx.yaml
rename to lib/testdata/want/kustomize/overlays/prod/apps-v1-deployment-nginx.yaml
diff --git a/api/testdata/want/kustomize/overlays/prod/extensions-v1beta1-deployment-javaspringapp.yaml b/lib/testdata/want/kustomize/overlays/prod/extensions-v1beta1-deployment-javaspringapp.yaml
similarity index 100%
rename from api/testdata/want/kustomize/overlays/prod/extensions-v1beta1-deployment-javaspringapp.yaml
rename to lib/testdata/want/kustomize/overlays/prod/extensions-v1beta1-deployment-javaspringapp.yaml
diff --git a/api/testdata/want/kustomize/overlays/prod/kustomization.yaml b/lib/testdata/want/kustomize/overlays/prod/kustomization.yaml
similarity index 100%
rename from api/testdata/want/kustomize/overlays/prod/kustomization.yaml
rename to lib/testdata/want/kustomize/overlays/prod/kustomization.yaml
diff --git a/api/testdata/want/kustomize/overlays/staging/apps-v1-deployment-nginx.yaml b/lib/testdata/want/kustomize/overlays/staging/apps-v1-deployment-nginx.yaml
similarity index 100%
rename from api/testdata/want/kustomize/overlays/staging/apps-v1-deployment-nginx.yaml
rename to lib/testdata/want/kustomize/overlays/staging/apps-v1-deployment-nginx.yaml
diff --git a/api/testdata/want/kustomize/overlays/staging/extensions-v1beta1-deployment-javaspringapp.yaml b/lib/testdata/want/kustomize/overlays/staging/extensions-v1beta1-deployment-javaspringapp.yaml
similarity index 100%
rename from api/testdata/want/kustomize/overlays/staging/extensions-v1beta1-deployment-javaspringapp.yaml
rename to lib/testdata/want/kustomize/overlays/staging/extensions-v1beta1-deployment-javaspringapp.yaml
diff --git a/api/testdata/want/kustomize/overlays/staging/kustomization.yaml b/lib/testdata/want/kustomize/overlays/staging/kustomization.yaml
similarity index 100%
rename from api/testdata/want/kustomize/overlays/staging/kustomization.yaml
rename to lib/testdata/want/kustomize/overlays/staging/kustomization.yaml
diff --git a/api/testdata/want/m2kconfig.yaml b/lib/testdata/want/m2kconfig.yaml
similarity index 100%
rename from api/testdata/want/m2kconfig.yaml
rename to lib/testdata/want/m2kconfig.yaml
diff --git a/api/testdata/want/m2kqacache.yaml b/lib/testdata/want/m2kqacache.yaml
similarity index 100%
rename from api/testdata/want/m2kqacache.yaml
rename to lib/testdata/want/m2kqacache.yaml
diff --git a/api/testdata/want/openshift-template/parameters-dev.yaml b/lib/testdata/want/openshift-template/parameters-dev.yaml
similarity index 100%
rename from api/testdata/want/openshift-template/parameters-dev.yaml
rename to lib/testdata/want/openshift-template/parameters-dev.yaml
diff --git a/api/testdata/want/openshift-template/parameters-prod.yaml b/lib/testdata/want/openshift-template/parameters-prod.yaml
similarity index 100%
rename from api/testdata/want/openshift-template/parameters-prod.yaml
rename to lib/testdata/want/openshift-template/parameters-prod.yaml
diff --git a/api/testdata/want/openshift-template/parameters-staging.yaml b/lib/testdata/want/openshift-template/parameters-staging.yaml
similarity index 100%
rename from api/testdata/want/openshift-template/parameters-staging.yaml
rename to lib/testdata/want/openshift-template/parameters-staging.yaml
diff --git a/api/testdata/want/openshift-template/template.yaml b/lib/testdata/want/openshift-template/template.yaml
similarity index 100%
rename from api/testdata/want/openshift-template/template.yaml
rename to lib/testdata/want/openshift-template/template.yaml
diff --git a/api/transformer.go b/lib/transformer.go
similarity index 99%
rename from api/transformer.go
rename to lib/transformer.go
index 2e85281e1..7dbd46417 100644
--- a/api/transformer.go
+++ b/lib/transformer.go
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package api
+package lib
import (
"github.com/konveyor/move2kube/internal/common"
diff --git a/api/validator.go b/lib/validator.go
similarity index 99%
rename from api/validator.go
rename to lib/validator.go
index 63ee0a663..e35bd6416 100644
--- a/api/validator.go
+++ b/lib/validator.go
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package api
+package lib
import (
"io/ioutil"
diff --git a/api/version.go b/lib/version.go
similarity index 98%
rename from api/version.go
rename to lib/version.go
index 6eac91ec6..31e5d1d15 100644
--- a/api/version.go
+++ b/lib/version.go
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package api
+package lib
import (
"gopkg.in/yaml.v3"
diff --git a/qaengine/engine.go b/qaengine/engine.go
index b8e555b8b..3a6338188 100644
--- a/qaengine/engine.go
+++ b/qaengine/engine.go
@@ -96,7 +96,7 @@ func SetupWriteCacheFile(writeCachePath string) {
func SetupConfigFile(writeConfigFile string, configStrings, configFiles, presets []string) {
presetPaths := []string{}
for _, preset := range presets {
- presetPath := filepath.Join(common.AssetsPath, "configs", preset+".yaml")
+ presetPath := filepath.Join(common.AssetsPath, "inbuilt", "presets", preset+".yaml")
presetPaths = append(presetPaths, presetPath)
}
configFiles = append(presetPaths, configFiles...)