tools

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

README

Application Assembler

Build GoDoc Go Report Card Code Coverage License Docker Repository on Quay

Table of Contents generated with DocToc

Overview

Application Assembler generates Application, Deployables and PlacementRule

Quick Start


  • Clone Repository
mkdir -p "$GOPATH"/src/github.com/hybridapp-io
cd "$GOPATH"/srcgithub.com/hybridapp-io
git clone https://github.com/hybridapp-io/ham-application-assembler.git
cd "$GOPATH"/src/github.com/hybridapp-io/ham-application-assembler
  • Install CRDs, Dependencies, Create Clusters and Cluster Namespaces (toronto, raleigh)
% kubectl apply -f ./deploy/crds
% kubectl apply -f ./hack/test
% kubectl apply -f ./hack/test/crs

This creates a db2 deployable CR with deployer-type annotation in raleigh namespace

  • Start Application Assembler (in another terminal)
    • opertor-sdk must be installed

    • kubeconfig points to a kubernetes cluster with admin privilege

cd "$GOPATH"/src/github.com/hybridapp-io/ham-application-assembler
operator-sdk run --local --namespace=""
  • Create ApplicationAssembler example and found Application and Deployable resources are created.
% kubectl apply -f ./examples/simple.yaml
applicationassembler.tools.hybridapp.io "simple" deleted
deployable.core.hybridapp.io "nginx" deleted
% kubectl get hdpl nginx -o yaml
apiVersion: core.hybridapp.io/v1alpha1
kind: Deployable
metadata:
  creationTimestamp: "2020-02-05T22:07:42Z"
  generation: 1
  labels:
    tools.hybridapp.io/application-868c6b0b-7e9a-4a96-8558-ca08bcb623c3: 868c6b0b-7e9a-4a96-8558-ca08bcb623c3
  name: nginx
  namespace: default
  resourceVersion: "13422517"
  selfLink: /apis/core.hybridapp.io/v1alpha1/namespaces/default/deployables/db2
  uid: ee4efc8c-4863-11ea-9dba-00000a101bb8
spec:
  hybridtemplates:
  - deployerType: kubernetes
    template:
      apiVersion: apps/v1
      kind: Deployment
      spec:
        replicas: 1
        selector:
          matchLabels:
            app: nginx
        template:
          metadata:
            labels:
              app: nginx
          spec:
            containers:
            - image: nginx:1.7.9
              name: nginx
              ports:
              - containerPort: 80
% kubectl get applications -o yaml
apiVersion: app.k8s.io/v1beta1
kind: Application
metadata:
  creationTimestamp: "2020-02-05T22:07:42Z"
  generation: 1
  labels:
    app.cp4mcm.ibm.com/application-assembler-id: ee408e63-4863-11ea-9dba-00000a101bb8
  name: simple
  namespace: default
  ownerReferences:
  - apiVersion: app.cp4mcm.ibm.com/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: ApplicationAssembler
    name: simple
    uid: ee408e63-4863-11ea-9dba-00000a101bb8
  resourceVersion: "13422519"
  selfLink: /apis/app.k8s.io/v1beta1/namespaces/default/applications/simple
  uid: ee5fb0fe-4863-11ea-9dba-00000a101bb8
spec:
spec:
  componentKinds:
  - group: core.hybridapp.io
    kind: Deployable
  descriptor: {}
  selector:
    matchLabels:
      tools.hybridapp.io/application-868c6b0b-7e9a-4a96-8558-ca08bcb623c3: 868c6b0b-7e9a-4a96-8558-ca08bcb623c3
status: {}

Documentation

Overview

Place any runtime dependencies as imports in this file. Go modules will be forced to download and install them.

Directories

Path Synopsis
cmd
pkg
apis/tools
Package tools contains tools API versions.
Package tools contains tools API versions.
apis/tools/v1alpha1
Package v1alpha1 contains API Schema definitions for the tools v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=tools.hybridapp.io Package v1alpha1 contains API Schema definitions for the tools v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=tools.hybridapp.io
Package v1alpha1 contains API Schema definitions for the tools v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=tools.hybridapp.io Package v1alpha1 contains API Schema definitions for the tools v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=tools.hybridapp.io

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL