Code Monkey home page Code Monkey logo

build's Introduction

Work in Progress License

shipwright-logo

Shipwright is an extensible framework for building container images on Kubernetes.

Why?

With Shipwright, developers get a simplified approach for building container images, by defining a minimal YAML that does not require any previous knowledge of containers or container tooling. All you need is your source code in git and access to a container registry.

Shipwright supports any tool that can build container images in Kubernetes clusters, such as:

Try It!

  • We assume you already have a Kubernetes cluster (v1.20+). If you don't, you can use KinD, which you can install by running ./hack/install-kind.sh.

  • We also require a Tekton installation (v0.27+). To install the newest supported version, run:

    kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.30.0/release.yaml
  • Install the Shipwright deployment. To install the latest version, run:

    kubectl apply --filename https://github.com/shipwright-io/build/releases/download/v0.6.0/release.yaml
  • Install the Shipwright strategies. To install the latest version, run:

    kubectl apply --filename https://github.com/shipwright-io/build/releases/download/v0.6.0/sample-strategies.yaml
  • Generate a secret to access your container registry, such as one on Docker Hub or Quay.io:

    REGISTRY_SERVER=https://index.docker.io/v1/ REGISTRY_USER=<your_registry_user> REGISTRY_PASSWORD=<your_registry_password>
    kubectl create secret docker-registry push-secret \
        --docker-server=$REGISTRY_SERVER \
        --docker-username=$REGISTRY_USER \
        --docker-password=$REGISTRY_PASSWORD  \
        --docker-email=<your_email>
  • Create a Build object, replacing <REGISTRY_ORG> with the registry username your push-secret secret have access to:

    REGISTRY_ORG=<your_registry_org>
    cat <<EOF | kubectl apply -f -
    apiVersion: shipwright.io/v1alpha1
    kind: Build
    metadata:
      name: buildpack-nodejs-build
    spec:
      source:
        url: https://github.com/shipwright-io/sample-nodejs
        contextDir: source-build
      strategy:
        name: buildpacks-v3
        kind: ClusterBuildStrategy
      output:
        image: docker.io/${REGISTRY_ORG}/sample-nodejs:latest
        credentials:
          name: push-secret
    EOF

To view the Build which you just created:

$ kubectl get builds

NAME                     REGISTERED   REASON      BUILDSTRATEGYKIND      BUILDSTRATEGYNAME   CREATIONTIME
buildpack-nodejs-build   True         Succeeded   ClusterBuildStrategy   buildpacks-v3       68s
  • Submit your BuildRun:

    cat <<EOF | kubectl create -f -
    apiVersion: shipwright.io/v1alpha1
    kind: BuildRun
    metadata:
      generateName: buildpack-nodejs-buildrun-
    spec:
      buildRef:
        name: buildpack-nodejs-build
    EOF
  • Wait until your BuildRun is completed and then you can view it as follows:

    $ kubectl get buildruns
    
    NAME                              SUCCEEDED   REASON      STARTTIME   COMPLETIONTIME
    buildpack-nodejs-buildrun-xyzds   True        Succeeded   69s         2s
    

    or

    kubectl get buildrun --output name | xargs kubectl wait --for=condition=Succeeded --timeout=180s
  • After your BuildRun is completed, check your container registry, you will find the new generated image uploaded there.

Please tell us more!

Depending on your source code, you might want to build it differently with Shipwright.

To find out more on what's the best strategy or what else can Shipwright do for you, please visit our tutorial!

More information

Read the Docs

Version Docs Examples
HEAD Docs @ HEAD Examples @ HEAD
v0.6.0 Docs @ v0.6.0 Examples @ v0.6.0
v0.5.1 Docs @ v0.5.1 Examples @ v0.5.1
v0.5.0 Docs @ v0.5.0 Examples @ v0.5.0
v0.4.0 Docs @ v0.4.0 Examples @ v0.4.0
v0.3.0 Docs @ v0.3.0 Examples @ v0.3.0
v0.2.0 Docs @ v0.2.0 Examples @ v0.2.0
v0.1.1 Docs @ v0.1.1 Examples @ v0.1.1
v0.1.0 Docs @ v0.1.0 Examples @ v0.1.0

Dependencies

Dependency Supported versions
Kubernetes v1.20.*, v1.21.*
Tekton v0.27.*, v0.28.*, v0.29.*, v0.30.*

Platform support

We are building container images of the Shipwright Build controller for all platforms supported by the base image that we are using which is registry.access.redhat.com/ubi8/ubi-minimal. Those are:

  • linux/amd64
  • linux/arm64
  • linux/ppc64le
  • linux/s390x

All these platforms are also supported by our Tekton Pipelines dependency. Our own tests as part of our CI pipeline are all only running on and testing the linux/amd64 platform.

Our sample build strategies are all functional on linux/amd64. Their support on other platforms relies on the tools being used there to be available for other platforms. For detailed information, please see Available ClusterBuildStrategies.

Want to get involved?

Community meetings

We host weekly meetings for users, contributors, maintainers and anyone interested in the project. The weekly meetings take place on Mondays at 1pm UTC.

Want to contribute

We are so excited to have you!

build's People

Contributors

adambkaplan avatar akram avatar avni-sharma avatar baijum avatar bigkevmcd avatar coreydaley avatar dewan-ahmed avatar dhritishikhar avatar gabemontero avatar heavywombat avatar imjasonh avatar jduimovich avatar jkhelil avatar kevydotvinu avatar mattcui avatar mayukhsobo avatar openshift-ci[bot] avatar openshift-merge-robot avatar otaviof avatar qu1queee avatar routerhan avatar samyak-jn avatar saschaschwarze0 avatar sbose78 avatar xiujuan95 avatar zhangtbj avatar

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.