github.com/sealerio/sealer@v0.11.1-0.20240507115618-f4f89c5853ae/README.md (about)

     1  # Sealer -- Build, Share and Run Any Distributed Applications
     2  
     3  [![License](https://img.shields.io/badge/license-Apache%202-brightgreen.svg)](https://github.com/sealerio/sealer/blob/master/LICENSE)
     4  [![Go](https://github.com/sealerio/sealer/actions/workflows/go.yml/badge.svg)](https://github.com/sealerio/sealer/actions/workflows/go.yml)
     5  [![Release](https://github.com/sealerio/sealer/actions/workflows/release.yml/badge.svg)](https://github.com/sealerio/sealer/actions/workflows/release.yml)
     6  [![GoDoc](https://godoc.org/github.com/sealerio/sealer?status.svg)](https://godoc.org/github.com/sealerio/sealer)
     7  [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5205/badge)](https://bestpractices.coreinfrastructure.org/en/projects/5205)
     8  [![Twitter](https://img.shields.io/badge/Follow-sealer-1DA1F2?logo=twitter)](https://twitter.com/sealer_oss)
     9  [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fsealerio%2Fsealer.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fsealerio%2Fsealer?ref=badge_shield)
    10  [![codecov](https://codecov.io/gh/sealerio/sealer/branch/main/graph/badge.svg?token=LH8XUR5YPL)](https://codecov.io/gh/sealerio/sealer)
    11  [![](https://img.shields.io/badge/Sealer-Check%20Your%20Contribution-orange)](https://opensource.alibaba.com/contribution_leaderboard/details?projectValue=sealer)
    12  
    13  ## Contents
    14  
    15  * [Introduction](#introduction)
    16  * [Quick Start](#quick-start)
    17  * [Contributing](./CONTRIBUTING.md)
    18  * [FAQ](./FAQ.md)
    19  * [Adopters](./Adopters.md)
    20  * [LICENSE](LICENSE)
    21  * [Code of conduct](./code-of-conduct.md)
    22  
    23  ## Introduction
    24  
    25  Sealer[ˈsiːlər] provides a new way of distributed application delivery which is reducing the difficulty and complexity by packaging Kubernetes cluster and all application's dependencies into one ClusterImage.
    26  
    27  We can write a Kubefile to build the ClusterImage, and use it to deliver your applications with embedded Kubernetes through Clusterfile.
    28  
    29  ![image](https://user-images.githubusercontent.com/8912557/117263291-b88b8700-ae84-11eb-8b46-838292e85c5c.png)
    30  
    31  > Concept
    32  
    33  * Kubefile: a file that describes how to build a ClusterImage.
    34  * ClusterImage: like docker image, and it contains all the dependencies(container images,yaml files or helm chart...) of your application needed.
    35  * Clusterfile: a file that describes how to run a ClusterImage.
    36  
    37  ![image](https://user-images.githubusercontent.com/8912557/117400612-97cf3a00-af35-11eb-90b9-f5dc8e8117b5.png)
    38  
    39  ## Awesome features
    40  
    41  * [x] Simplicity: Packing the distributed application into ClusterImage with few instructions.
    42  * [x] Efficiency: Launching the k8s-based application through ClusterImage in minutes.
    43  * [x] Scalability: Powerful cluster and image life cycle management, such as cluster scale, upgrade, image load, save and so on.
    44  * [x] Compatibility: Multi-arch delivery Supporting. Such as AMD, ARM with common Linux distributions.
    45  * [x] Iterative: Incremental operations on ClusterImage is like what container image behaves.
    46  
    47  ## Quick start
    48  
    49  Download sealer binary file.
    50  
    51  ```shell script
    52  #install Sealer binaries
    53  wget https://github.com/sealerio/sealer/releases/download/v0.9.3/sealer-v0.9.3-linux-amd64.tar.gz && \
    54  tar zxvf sealer-v0.9.3-linux-amd64.tar.gz && mv sealer /usr/bin
    55  ```
    56  
    57  ## Install a kubernetes cluster
    58  
    59  ```shell
    60  # run a kubernetes cluster
    61  sealer run docker.io/sealerio/kubernetes:v1-22-15-sealerio-2 \
    62    --masters 192.168.0.2,192.168.0.3,192.168.0.4 \
    63    --nodes 192.168.0.5,192.168.0.6,192.168.0.7 --passwd xxx
    64  ```
    65  
    66  ## Build an sealer image
    67  
    68  Kubefile:
    69  
    70  ```shell
    71  FROM docker.io/sealerio/kubernetes:v1-22-15-sealerio-2
    72  APP mysql https://charts/mysql.tgz
    73  APP elasticsearch https://charts/elasticsearch.tgz
    74  APP redis local://redis.yaml
    75  APP businessApp local://install.sh
    76  LAUNCH ["calico", "mysql", "elasticsearch", "redis", "businessApp"]
    77  ```
    78  
    79  or
    80  
    81  ```shell
    82  FROM docker.io/sealerio/kubernetes:v1-22-15-sealerio-2
    83  COPY mysql.tgz .
    84  COPY elasticsearch.tgz .
    85  COPY redis.yaml .
    86  COPY install.sh .
    87  CMDS ["sh application/apps/calico/calico.sh", "helm install mysql.tgz", "helm install elasticsearch.tgz", "kubectl apply -f redis.yaml", "bash install.sh"]
    88  ```
    89  
    90  build command:
    91  
    92  > NOTE: --type=kube-installer is the default value for sealer build
    93  
    94  ```shell
    95  sealer build -f Kubefile -t my-kubernetes:1.0.0 .
    96  ```
    97  
    98  ## Build an app image
    99  
   100  nginx.yaml:
   101  
   102  ```shell
   103  apiVersion: apps/v1
   104  kind: Deployment
   105  metadata:
   106    name: my-nginx
   107    namespace: default
   108  spec:
   109    replicas: 1
   110    selector:
   111      matchLabels:
   112        run: my-nginx
   113    template:
   114      metadata:
   115        labels:
   116          run: my-nginx
   117      spec:
   118        containers:
   119          - name: my-nginx
   120            image: nginx
   121            ports:
   122              - containerPort: 80
   123  ```
   124  
   125  Kubefile:
   126  
   127  ```shell
   128  FROM scratch
   129  APP nginx local://nginx.yaml
   130  LAUNCH ["nginx"]
   131  ```
   132  
   133  ```shell
   134  sealer build -f Kubefile -t sealer-io/nginx:latest --type app-installer
   135  ```
   136  
   137  ## Run the app image
   138  
   139  ```shell
   140  sealer run sealer-io/nginx:latest
   141  # check the pod
   142  kubectl get pod -A
   143  ```
   144  
   145  ## Push the app image to the registry
   146  
   147  ```shell
   148  # you can push the app image to docker hub, Ali ACR, or Harbor
   149  sealer tag sealer-io/nginx:latest {registryDomain}/sealer-io/nginx:latest
   150  sealer push {registryDomain}/sealer-io/nginx:latest
   151  ```
   152  
   153  ## Clean the cluster
   154  
   155  Some information of the basic settings will be written to the Clusterfile and stored in /root/.sealer/Clusterfile.
   156  
   157  ```shell
   158  sealer delete -a
   159  ```
   160  
   161  ## User guide
   162  
   163  Sealer provides a valid image list:
   164  
   165  | version  |                              image                                  |                  Arch                   |                                                           OS                                                        |              Network plugins            |             container runtime           |
   166  | :------: | :-----------------------------------------------------------------: | :-------------------------------------: | :-----------------------------------------------------------------------------------------------------------------: | :-------------------------------------: | :-------------------------------------: |
   167  | v0.8.6   | registry.cn-qingdao.aliyuncs.com/sealer-io/kubernetes:v1.22.15-0.8.6|                   x86                   |     CentOS/RHEL 7.5<br>CentOS/RHEL 7.6<br>CentOS/RHEL 7.7<br>CentOS/RHEL 7.8<br>CentOS/RHEL 7.9<br>Ubuntu 20.04     |                 calico                  |            hack docker v19.03.14        |
   168  | v0.9.3   | docker.io/sealerio/kubernetes:v1-18-3-sealerio-2                    |                x86/arm64                |     CentOS/RHEL 7.5<br>CentOS/RHEL 7.6<br>CentOS/RHEL 7.7<br>CentOS/RHEL 7.8<br>CentOS/RHEL 7.9<br>Ubuntu 20.04     |                 calico                  |            hack docker v19.03.14        |
   169  | v0.9.3   | docker.io/sealerio/kubernetes:v1-20-4-sealerio-2                    |                x86/arm64                |     CentOS/RHEL 7.5<br>CentOS/RHEL 7.6<br>CentOS/RHEL 7.7<br>CentOS/RHEL 7.8<br>CentOS/RHEL 7.9<br>Ubuntu 20.04     |                 calico                  |            hack docker v19.03.14        |
   170  | v0.9.3   | docker.io/sealerio/kubernetes:v1-22-15-sealerio-2                   |                x86/arm64                |     CentOS/RHEL 7.5<br>CentOS/RHEL 7.6<br>CentOS/RHEL 7.7<br>CentOS/RHEL 7.8<br>CentOS/RHEL 7.9<br>Ubuntu 20.04     |                 calico                  |            hack docker v19.03.14        |
   171  
   172  [get started](http://sealer.cool/docs/getting-started/introduction.html)
   173  
   174  ## Official website
   175  
   176  [official website](http://sealer.cool)
   177  
   178  ## Developing Sealer
   179  
   180  * [contributing guide](./CONTRIBUTING.md)
   181  
   182  ## Communication Channels
   183  
   184  * CNCF Mailing List: to be added.
   185  * Twitter: [@sealer](https://twitter.com/sealer_oss)
   186  * DingTalk Group Number: 34619594
   187  
   188  <!-- markdownlint-disable -->
   189  <div align="center">
   190    <img src="https://user-images.githubusercontent.com/31209634/199941518-82f88ba5-d13c-420c-9197-95a422f6b543.JPG" width="300" title="dingtalk">
   191  </div>
   192  <!-- markdownlint-restore -->
   193  
   194  ## Code of Conduct
   195  
   196  sealer follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
   197  
   198  ## License
   199  
   200  Sealer is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full license text.
   201  
   202  [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fsealerio%2Fsealer.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fsealerio%2Fsealer?ref=badge_large)