Giter VIP home page Giter VIP logo

konveyor / move2kube Goto Github PK

View Code? Open in Web Editor NEW
380.0 19.0 120.0 17.18 MB

Move2Kube is a command-line tool for automating creation of Infrastructure as code (IaC) artifacts. It has inbuilt support for creating IaC artifacts for replatforming to Kubernetes/Openshift.

Home Page: https://move2kube.konveyor.io/

License: Apache License 2.0

Dockerfile 0.86% Makefile 0.62% Go 95.89% Shell 1.16% JavaScript 0.18% Batchfile 0.45% HTML 0.07% CSS 0.02% Python 0.76%
kubernetes modernization replatform move2kube hacktoberfest

move2kube's Introduction

Build Container Repository on Quay License Go Report Card

Move2Kube

Move2Kube is a command-line tool that accelerates the process of re-platforming to Kubernetes/Openshift. It does so by analyzing 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.

Usage

Installation

Using the install script

To install the latest stable version:

bash <(curl https://raw.githubusercontent.com/konveyor/move2kube/main/scripts/install.sh)

To install a specific version (for example version v0.3.0-alpha.3):

MOVE2KUBE_TAG='v0.3.0-alpha.3' bash <(curl https://raw.githubusercontent.com/konveyor/move2kube/main/scripts/install.sh)

To install the bleeding edge version:

BLEEDING_EDGE='true' bash <(curl https://raw.githubusercontent.com/konveyor/move2kube/main/scripts/install.sh)

Uninstall CLI installed via the install script

Simply remove the binary

rm /usr/local/bin/move2kube

Using Homebrew

brew tap konveyor/move2kube
brew install move2kube

Uninstall CLI installed via Homebrew

brew uninstall move2kube
brew untap konveyor/move2kube

UI

To bring up UI version:

Using docker:

docker run --rm -it -p 8080:8080 quay.io/konveyor/move2kube-ui:latest

Using podman:

podman run --rm -it -p 8080:8080 quay.io/konveyor/move2kube-ui:latest

Then go to http://localhost:8080 in a browser

More detailed instructions can be found in the Move2Kube UI repo

Usage

move2kube transform -s src, where src is the folder containing the source artifacts.

Checkout the Tutorials and Documentation for more information.

Development environment setup

To browse code Open in VSCode

  1. Obtain a recent version of golang. Known to work with 1.19.
  2. Ensure $GOPATH is set. If it's not set:
    1. mkdir ~/go
    2. export GOPATH=~/go
  3. Obtain this repo:
    1. mkdir -p $GOPATH/src/
    2. Clone this repo into the above directory.
    3. cd $GOPATH/src/move2kube
  4. Build: make build
  5. Run unit tests: make test

Artifacts Required

Source Artifact available Features supported
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, 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 Change versions, parameterize and create Helm chart, Kustomize yamls and Openshift templates.

Output

  • Deployment artifacts
    • Dockerfile
    • Kubernetes/Openshift Yamls
    • Helm charts
    • Kustomize
    • OpenShift Templates
    • Docker compose

Some Useful Configuration

You can set an alias for move2kube to make it more convenient to use. The following command allows you to refer to move2kube as m2k for the current terminal session:

alias m2k="move2kube"

To configure it globally:

To keep aliases between sessions, you can save them in your user’s shell configuration profile file

Bash (.bashrc or .bash_profile)

echo 'alias m2k="move2kube"' >> ~/.bashrc
source ~/.bashrc

Discussion

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.