Giter Club home page Giter Club logo

sealer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sealer's Issues

sealer save sealer load command

Like docker save docker load, sealer save can save a CloudImage to tar.gz, and load command can load it.

sealer save -o kubernetes.tar.gz kubernetes:v1.18.3
sealer load -i kubernetes.tar.gz

garbage clean and data synchronization

Issue Description

sealer execution might generate some garbages like /tmp/sealer-compress-xxx(ctrl+c on pulling or pushing).

will it be better to define a daemon module(starts on sealer starts), this daemon module do some jobs like garbage clean, data synchronization etc.
Type: feature request

Describe what feature you want

Additional context

Add any other context or screenshots about the feature request here.

sealer push compressing progress

What happened:

sealer push

[root@iZj6c5mhum14tik63i0x98Z ~]#sealer push registry-vpc.cn-hongkong.aliyuncs.com/sealyun/kubernetes-amd64:v1.19.9
Start to Push Image registry-vpc.cn-hongkong.aliyuncs.com/sealyun/kubernetes-amd64:v1.19.9
c17aeee67cc5 Compressing 0.00b/1.00b

0.00b/1.00b no change

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

atomic write file

Issue Description

Type: feature request
There are some scenes in our project that need writing files in an atomic way, like image metadata and image map should be updated atomically.

Describe what feature you want

Additional context

The way for writing files atomically in docker is leveraging temp name file, and mv it to target name.
Add any other context or screenshots about the feature request here.

not rebase code ,then cI error

Issue Description

Type: feature request

if not rebase code from head , then ci show error.

Describe what feature you want

Additional context

Add any other context or screenshots about the feature request here.

registry images question

Issue Description

for now, k8s images is sea.hub:5000/library/xxx

but other images is sea.hub:5000/xxxx ex calico and lvscare image

can we unite all image namespace in registry(sea.hub:5000) ?

Describe what feature you want

Additional context

Add any other context or screenshots about the feature request here.

sealer images print more header

Issue Description

Type: feature request

Describe what feature you want

print image tag and size

Additional context

Add any other context or screenshots about the feature request here.

error message from command execution failure should be more detailed rather than output exit status code

What happened:

In #67, we found that when some shell code execution failed, the error message will display like the following

docker: Error response from daemon: driver failed programming external connectivity on endpoint seadent-registry (c169ccac09f30ee8201996eed31259dbe87e35f20bcb4637664de665ede5cbcd):  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 5000 -j DNAT --to-destination 172.17.0.2:5000 ! -i docker0: iptables: No chain/target/match by that name.
 (exit status 1)).
2021-05-10 23:49:54 [EROR] exec command failed Process exited with status 125

Actually it does not provide the detailed root cause of execution failure. While there is only exited with status xxx which seams useless.

What you expected to happen:

When shell execution fails, more detailed error message shows.

How to reproduce it (as minimally and precisely as possible):

none

Anything else we need to know?:

none

Environment:

  • sealer version (use sealer version): latest
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

failed to run one master cluster

What happened:

image

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

support log level

Issue Description

Type: feature request
All logs info will be output at present. I suppose some of information are not used at runtime, but at the development stage, we need some specific info.

Describe what feature you want

I think we can provide log level or debug mode.

Additional context

Add any other context or screenshots about the feature request here.

failed to exec sealer run kubernetes:v1.16.9 --masters ***

What happened:

sealer run kubernetes:v1.16.9 -m 172.16.0.234
image

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

exec :
kubeadm init --config=/var/lib/sealer/data/my-cluster/kubeadm-config.yaml --upload-certs -v 0 --ignore-preflight-errors=SystemVerification
image

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

sealer need a common module to interactive with os

Issue Description

Type: feature request

Describe what feature you want

as we see ,our sealer code has many os ops like copy dir ,create dir and so on.
but some actions,such as set file perm,set dir default umask, was performed individually.
refer to docker , it has specialized modules to interact with os named filesystem.

Additional context

Add any other context or screenshots about the feature request here.

Executing sealer delete will pull the image

What happened:

image

What you expected to happen:

sealer run kubernetes:v1.16.9 -m 1 -n 1
then sealer delete -f /root/.sealer/my-cluster/Clusterfile

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

Proposal: design the document architecture for sealer project

Hi, All,

The iteration of sealer's code has turned regular gradually. It is a really good sign of a potential project. While as an open source project, the document is also important for community participant to join the project, no matter they are contributors, adopters, or just wanderers.

Here is a proposal that design of initial document architecture:

alibaba/sealer
 |-----docs
         |---- api
         |---- commandline
         |---- features
         |---- design_docs
         |---- user_guidance
         |---- architecture
         |---- README.md
|----- CHANGELOG.md
|----- FAQ.md
|----- ROADMAP.md
|----- ADOPTION.md
|----- CONTRIBUTING.md
|----- MAINTAINER.md
|----- GOVERNANCE.md

need to delete Clusterfile when run sealer delete

What happened:

run sealer delete -f /tmp/Clusterfile
delete cluster : ok
/tmp/Clusterfile : still exists

What you expected to happen:

i think our delete cmd reconcile the cluster while the clusterfile specified was also need to be deleted

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

image pull and enter CTRL+C

What happened:

  1. sealer pull registry.cn-qingdao.aliyuncs.com/seadent/cloudrootfs:v1.16.9-alpha.7
  2. sealer images found 1 images
  3. rm -rf /var/lib/seadent/
  4. sealer pull registry.cn-qingdao.aliyuncs.com/seadent/cloudrootfs:v1.16.9-alpha.7
  5. wait downlad ex 12.09MiB and enter CTRL+C abort it
  6. again sealer pull registry.cn-qingdao.aliyuncs.com/seadent/dashboard:latest
  7. logger is sucess
  8. but image layers is miss some files

image

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

build image local mode not set Clusterfile to image metadata

What happened:

registry.cn-qingdao.aliyuncs.com/sealer-io/cloudrootfs:v1.19.9-alpha.3

sealer build -t registry.cn-qingdao.aliyuncs.com/sealer-io/cloudrootfs:v1.19.9-alpha.3 .

cat /var/lib/sealer/metadata/9ce2938527c2aff4b95e78fd961b7a19.yaml

kind: Image
metadata:
  creationTimestamp: null
  name: registry.cn-hongkong.aliyuncs.com/sealyun/kubernetes-amd64:v1.19.9
spec:
  hash: ""
  id: 9ce2938527c2aff4b95e78fd961b7a19
  layers:
  - hash: 245d2093fabc329a6654751f63999d7fec433de59a4ed7ca244398e2c01582ba
    type: COPY
    value: . .
  mergedLayer: ""
status: {}

not clusterfile config

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

docker run registry error. iptables: No chain/target/match by that name.

What happened:

sealer apply -f clusterfile.yaml

What you expected to happen:

run success

How to reproduce it (as minimally and precisely as possible):

cat cluster.yaml
apiVersion: sealer.aliyun.com/v1alpha1
kind: Cluster
metadata:
  name: my-cluster
spec:
  image: registry.cn-hongkong.aliyuncs.com/sealyun/kubernetes-amd64:v1.19.9
  provider: BAREMETAL
  ssh:
    passwd: centos
    user: root
  network:
    interface: ens33
    cniName: calico
    podCIDR: 100.64.0.0/10
    svcCIDR: 10.96.0.0/22
    withoutCNI: false
  certSANS:
    - aliyun-inc.com
    - 10.0.0.2
    
  masters:
    ipList:
     - 192.168.60.128 

Anything else we need to know?:

some logs.

Loaded image: registry:2.7.1
+ [[ -n /var/lib/sealer/data/my-cluster/registry ]]
+ docker run -d --restart=always --name seadent-registry -p 5000:5000 -v /var/lib/sealer/data/my-cluster/registry:/var/lib/registry registry:2.7.1
595e71d37d7aec10c89b38bb2e277ab7f5151699e350c2e48e176e3a071547f8
docker: Error response from daemon: driver failed programming external connectivity on endpoint seadent-registry (c169ccac09f30ee8201996eed31259dbe87e35f20bcb4637664de665ede5cbcd):  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 5000 -j DNAT --to-destination 172.17.0.2:5000 ! -i docker0: iptables: No chain/target/match by that name.
 (exit status 1)).
2021-05-10 23:49:54 [EROR] exec command failed Process exited with status 125
2021-05-10 23:49:54 [EROR] exec command failed 192.168.60.128 cd /var/lib/sealer/data/my-cluster/scripts && sh init-registry.sh 5000 /var/lib/sealer/data/my-cluster/registry
[root@localhost ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@localhost ~]# docker run -d --restart=always --name seadent-registry -p 5000:5000 -v /var/lib/sealer/data/my-cluster/registry:/var/lib/registry registry:2.7.1
docker: Error response from daemon: Conflict. The container name "/seadent-registry" is already in use by container "595e71d37d7aec10c89b38bb2e277ab7f5151699e350c2e48e176e3a071547f8". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
595e71d37d7a        registry:2.7.1      "/entrypoint.sh /etc…"   57 seconds ago      Created                                 seadent-registry
[root@localhost ~]# docker logs -f 595
[root@localhost ~]# docker logs 595   
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS              PORTS               NAMES
595e71d37d7a        registry:2.7.1      "/entrypoint.sh /etc…"   About a minute ago   Created                                 seadent-registry
[root@localhost ~]# iptables -vnL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
[root@localhost ~]# iptables -vnL -t nat
Chain PREROUTING (policy ACCEPT 5 packets, 688 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain INPUT (policy ACCEPT 5 packets, 688 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 237 packets, 13300 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain POSTROUTING (policy ACCEPT 237 packets, 13300 bytes)
 pkts bytes target     prot opt in     out     source               destination 

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

find in iptables chain have no DOCKER chain. but docker is runing normally(may usptream bug).

finally . restart docker turns ok.

systemctl restart docker 

public registry pull

What happened:

sealer pull registry.cn-qingdao.aliyuncs.com/seadent/cloudrootfs:v1.16.9-alpha.7

2021-04-30 13:05:43 [WARN] [github.com/alibaba/sealer/image/base_image_manager.go:55] failed to get docker info, err: open /root/.docker/config.json: no such file or directory
2021-04-30 13:05:44 [EROR] Get https://registry.cn-qingdao.aliyuncs.com/v2/seadent/cloudrootfs/manifests/v1.16.9-alpha.7: http: non-successful response (status=401 body="{\"errors\":[{\"code\":\"UNAUTHORIZED\",\"message\":\"authentication required\",\"detail\":[{\"Type\":\"repository\",\"Class\":\"\",\"Name\":\"seadent/cloudrootfs\",\"Action\":\"pull\"}]}]}\n")

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

design cache mechanism

Issue Description

sealer build will generate tmp dir for immediate layers, but never cache them, which result in repeating same operations at every build.
Type: feature request

Describe what feature you want

design and finish the cache ability, then the issue #62 of image id could be resolved

Additional context

Add any other context or screenshots about the feature request here.

What is the 5W1H of sealer project?

I have thoroughly read the readme details of sealer project. While I am afraid I still have a few confusion on it. First of all, I have no idea why we/you/ali/industry need it. I have no doubt you guys are pretty sure what the answer is. But maybe we could spare some time to polish the readme document. I think the 5W1H is widely adopted in most work:

  • Why
  • What
  • Where
  • When
  • Who
  • How

Really appreciate it if we could provide more clear declaration for the community.

Support print file:line in log

I suggest print log with file:line header which is useful for development and debugging. I copied some log from kubeedge which uses klog to print a detailed log.
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
5 I0510 13:25:09.138707 4537 server.go:65] Version: v1.6.0-beta.0.147+46b6e52b139902-dirty
6 I0510 13:25:09.142670 4537 module.go:34] Module cloudhub registered successfully
7 I0510 13:25:09.457349 4537 module.go:34] Module edgecontroller registered successfully
8 I0510 13:25:09.457453 4537 module.go:34] Module devicecontroller registered successfully
9 I0510 13:25:09.457493 4537 module.go:34] Module synccontroller registered successfully
10 W0510 13:25:09.457547 4537 module.go:37] Module cloudStream is disabled, do not register
11 W0510 13:25:09.457565 4537 module.go:37] Module router is disabled, do not register

Issue Description

Type: feature request

Describe what feature you want

Need more detailed log error information as file:line style.

Additional context

Add any other context or screenshots about the feature request here.

lint error

What happened:

lint add more rules,so ci is error. need fix it.

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

.docker/config.json is optional when registry is public, apply cluster failed!

[root@iZ2vcipyzgndofhfm6e8knZ ~]# sealer run cloudrootfs:v1.16.9-alpha.7
2021-05-13 16:04:04 [WARN] [github.com/alibaba/sealer/image/base_image_manager.go:83] failed to get docker info, err: open /root/.docker/config.json: no such file or directory
2021-05-13 16:04:06 [INFO] create resource success sea.aliyun.com/VpcID: vpc-2vcp77zanlb5708apayya
2021-05-13 16:04:06 [INFO] create resource success sea.aliyun.com/ZoneID: cn-chengdu-b
2021-05-13 16:04:11 [INFO] create resource success sea.aliyun.com/VSwitchID: vsw-2vc9cokxy57489zj70qte
2021-05-13 16:04:12 [INFO] create resource success sea.aliyun.com/SecurityGroupID: sg-2vccob4rtaf8cmerschc
2021-05-13 16:04:23 [INFO] reconcile master instances success [172.16.0.144 172.16.0.146 172.16.0.145]
2021-05-13 16:04:33 [INFO] reconcile node instances success [172.16.0.149 172.16.0.148 172.16.0.147]
2021-05-13 16:04:37 [INFO] create resource success sea.aliyun.com/EipID: eip-2vcsyva6ahui1kndg3lu2
2021-05-13 16:04:44 [DEBG] copy files src /usr/bin/sealer to dst /usr/local/bin/sealer
2021-05-13 16:04:44 [INFO] [ssh][47.108.189.49] : mkdir -p /usr/local/bin || true
Success to copy /usr/bin/sealer to /usr/local/bin/sealer
2021-05-13 16:04:49 [INFO] [ssh][47.108.189.49] : chmod +x /usr/local/bin/sealer
2021-05-13 16:04:49 [INFO] send sealer cmd to 47.108.189.49 success !
2021-05-13 16:04:49 [DEBG] copy files src /tmp/Clusterfile to dst /tmp/Clusterfile
2021-05-13 16:04:49 [INFO] [ssh][47.108.189.49] : mkdir -p /tmp || true
Success to copy /tmp/Clusterfile to /tmp/Clusterfile
2021-05-13 16:04:49 [INFO] send cluster file to 47.108.189.49 success !
2021-05-13 16:04:49 [DEBG] copy files src /root/.docker/config.json to dst /root/.docker/config.json
2021-05-13 16:04:49 [INFO] [ssh][47.108.189.49] : mkdir -p /root/.docker || true
2021-05-13 16:04:49 [EROR] send register config to remote host 47.108.189.49 failed:get file stat failed stat /root/.docker/config.json: no such file or directory

Don't login and run a cloudImage will failed.

use hight level rootfs install cluster error

What happened:

use cluster images registry.cn-qingdao.aliyuncs.com/sealer-io/cloudrootfs:v1.19.9-alpha.1 install cluster

install host logger

2021-05-13 17:10:40 [EROR] init master0 failed, error: [ssh][192.168.64.9]run command failed [kubeadm init --config=/var/lib/sealer/data/cloud-kernel/kubeadm-config.yaml --upload-certs -v 0 --ignore-preflight-errors=SystemVerification], Process exited with status 1. Please clean and reinstall

in 192.168.64.9 exec found

root@sealer1:~# kubeadm init --config=/var/lib/sealer/data/cloud-kernel/kubeadm-config.yaml --upload-certs -v 0 --ignore-preflight-errors=SystemVerification
W0513 17:13:30.271923   23615 common.go:77] your configuration file uses a deprecated API spec: "kubeadm.k8s.io/v1beta1". Please use 'kubeadm config migrate --old-config old.yaml --new-config new.yaml', which will write the new, similar spec using a newer API version.
this version of kubeadm only supports deploying clusters with the control plane version >= 1.18.0. Current version: v1.16.9
To see the stack trace of this error execute with --v=5 or higher

https://github.com/alibaba/sealer/blob/1c7b0e58f0b3c737e7dca25214c89108184a3362/runtime/init.go#L74

we need fix it ,all images support version is v1.16.9 ,we read rootfs in cluster metadata info

image

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

sealer build show size error

What happened:

I‘am not login registry
seautil build -f Kubefile -t kuberketes:1.19.9 .

What you expected to happen:

2021-05-04 18:58:34 [INFO] init image spec success! image id is e38adb0dc9c86c6cfda52c149315c423
2021-05-04 18:58:34 [INFO] run build layer: COPY . .
2021-05-04 18:59:36 [INFO] exec all build instructs success !
2021-05-04 18:59:36 [INFO] write image yaml file to /var/lib/seadent/metadata/e38adb0dc9c86c6cfda52c149315c423.yaml success !
2021-05-04 18:59:36 [INFO] update image kuberketes:1.19.9 to image metadata success !
2021-05-04 18:59:36 [WARN] [github.com/alibaba/sealer/image/base_image_manager.go:55] failed to get docker info, err: open /root/.docker/config.json: no such file or directory
Start to Push Image kuberketes:1.19.9
58a6208abe0b Pushing 8388608.00TiB/518.10MiB

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

Improve registry sdk

Issue Description

Type: feature request

Describe what feature you want

Currently, we are using an registry sdk( https://github.com/genuinetools/reg ) which hasn't been updated for two years. The registry has some problem, like not verifying auth info on initing registry client, and err messages are not described specificly.
I think it's critical to improve our registry sdk, we'd better learn from implementation of docker.

Additional context

Add any other context or screenshots about the feature request here.

build error

What happened:

╰─$ ./sealer login registry.cn-qingdao.aliyuncs.com -u XXXXX -p XXXXX 1 ↵
2021/05/12 19:43:53 registry.ping url=https://registry.cn-qingdao.aliyuncs.com/v2/
2021-05-12 19:43:54 [INFO] XXXX login registry.cn-qingdao.aliyuncs.com success

╰─$ ./sealer -b local build -t registry.cn-qingdao.aliyuncs.com/sealer-io/dashboard:latest .
2021-05-12 19:43:57 [WARN] decode kubeFile line failed
2021-05-12 19:43:57 [WARN] decode kubeFile line failed
2021-05-12 19:43:57 [WARN] decode kubeFile line failed
2021-05-12 19:43:57 [WARN] decode kubeFile line failed
2021-05-12 19:43:57 [WARN] decode kubeFile line failed
2021-05-12 19:43:57 [WARN] decode kubeFile line failed
2021-05-12 19:43:57 [WARN] decode kubeFile line failed
2021-05-12 19:43:57 [INFO] init image spec success! image id is 2e7758f2b0702652e81909b61d0a6dcd
2021-05-12 19:43:58 [EROR] failed to pull baseImage: Get "https://registry.cn-qingdao.aliyuncs.com/v2/sealer-io/cloudrootfs/manifests/v1.16.9-alpha.6": http: non-successful response (status=401 body="{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"repository","Class":"","Name":"sealer-io/cloudrootfs","Action":"pull"}]}]}\n")

╰─$ cat Kubefile 1 ↵

base CloudImage contains all the files that run a kubernetes cluster needed.

1. kubernetes components like kubectl kubeadm kubelet and apiserver images ...

2. docker engine, and a private registry

3. config files, yaml, static files, scripts ...

FROM registry.cn-qingdao.aliyuncs.com/sealer-io/cloudrootfs:v1.16.9-alpha.6

download kubernetes dashboard yaml file

RUN wget https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml

when run this CloudImage, will apply a dashboard manifests

CMD kubectl apply -f recommended.yaml

What you expected to happen:

(Sorry, my english is not good )

  1. build successfully ( build 成功)
  2. Comment lines do not require warning (注释行,不需要警告,应该忽略)

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

sealer pull image error

What happened:

sealer pull

sealer pull registry.cn-hongkong.aliyuncs.com/sealyun/kubernetes-amd64:v1.19.9
2021-05-07 10:15:59 [WARN] [github.com/alibaba/sealer/image/base_image_manager.go:57] failed to decode auth info, username and password would be empty, err: auth for registry.cn-hongkong.aliyuncs.com doesn't exist
Start to Pull Image registry.cn-hongkong.aliyuncs.com/sealyun/kubernetes-amd64:v1.19.9
2021-05-07 10:16:02 [EROR] open /var/lib/seadent/metadata/layerdb: no such file or directory

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

action issue

Issue Description

Type: feature request

Describe what feature you want

issue add command /ok-test to exec action

Additional context

Add any other context or screenshots about the feature request here.

upgrade cluster

https://github.com/alibaba/sealer/blob/main/runtime/runtime.go#L13

user upgrade kubenetes version:

  1. Edit the cluster image in. sealer/[cluster name]/Clusterfile
apiVersion: sealer.aliyun.com/v1alpha1
kind: Cluster
metadata:
  name: my-cluster
spec:
  image: registry.cn-qingdao.aliyuncs.com/sealer/cloudrootfs:v1.16.9-alpha.5 # upgrade it to cloudrootfs:v1.17.9 and save.
  1. sealer apply -f .sealer/[cluster name]/Clusterfile

validate auth info before building a image

What happened:

sealer build will push image after building done. And sealer build -t cloudfs:xxx will be push to "registry.cn-qingdao.aliyuncs.com" by default.

What you expected to happen:

pushing to "registry.cn-qingdao.aliyuncs.com" by default is weird. I think registry url should be specified when push a image.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

e2e test

sealer project e2e test, and add a test github action.

sealer push image id

Issue Description

Type: feature request

Describe what feature you want

Additional context

image

push image success but pull failed

What happened:

image

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

run sealer build -f kubefile -t seadent/testnew:latest .

Anything else we need to know?:

my build kubefile as below:

FROM seadent/rootfs:latest
COPY abc .
COPY recommended.yaml .
CMD kubectl apply -f recommended.yaml
COPY kubefile_onlycopy_overwriteclusterfile_withoutreg .
COPY kubefile_set_images_name_with_reg  .
RUN wget helm.sh/helm
RUN wget -O redis.tar.gz http://download.redis.io/releases/redis-5.0.3.tar.gz
RUN tar zxvf redis.tar.gz 
CMD yum install tree -y

this is image yaml
image

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

sealer tag after rmi image

What happened:

sealer pull seadent/rootfs:latest
sealer tag seadent/rootfs:latest seadent/rootfs:aaaaa
sealer images

+----------------------------------+------------------------------------------------------------------------+
|             IMAGE ID             |                               IMAGE NAME                               |
+----------------------------------+------------------------------------------------------------------------+
| e4d64224c4c5a51e2a2064e120cada85 | seadent/rootfs:aaaaa                                                   |
+----------------------------------+------------------------------------------------------------------------+

sealer rmi seadent/rootfs:aaaaa 

2021-05-13 22:03:51 [EROR] e4d64224c4c5a51e2a2064e120cada85.yaml parsing failed, open /var/lib/sealer/metadata/e4d64224c4c5a51e2a2064e120cada85.yaml: no such file or directory


What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

sealer login not enter username password

What happened:

  1. enter sealer login registry-vpc.cn-hongkong.aliyuncs.com no enter username and password auto login tips success
  2. cat ~/.docker/config.json
   {
  "auths": {
  	"registry-vpc.cn-hongkong.aliyuncs.com": {
  		"auth": "Og=="
  	},
  	"registry-vpc.cn-hongkong.aliyuncs.com/sealyun/kubernetes-amd64": {
  		"auth": "Og=="
  	},
  	"registry.cn-beijing.aliyuncs.com": {
  		"auth": "xxxxxxx"
  	}
  }
}

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

rootfs support arm and containerd

Issue Description

Type: feature request

let rootfs support arm and containerd,we need redeploy ?

Describe what feature you want

Additional context

Add any other context or screenshots about the feature request here.

Wrong Clusterfile in cloudrootfs

What happened:

image

How to reproduce it (as minimally and precisely as possible):

Run a cloud image witch don't have registry namespace.

rootfs change

├── bin
│   ├── conntrack
│   ├── containerd-rootless-setuptool.sh
│   ├── containerd-rootless.sh
│   ├── crictl
│   ├── kubeadm
│   ├── kubectl
│   ├── kubelet
│   ├── nerdctl
│   └── seautil
├── cni
│   └── calico
│       └── calico.yaml.tmpl
├── cri
│   ├── containerd
│   ├── containerd-shim
│   ├── containerd-shim-runc-v2
│   ├── ctr
│   ├── docker
│   ├── dockerd
│   ├── docker-init
│   ├── docker-proxy
│   ├── rootlesskit
│   ├── rootlesskit-docker-proxy
│   ├── runc
│   └── vpnkit
├── etc
│   ├── 10-kubeadm.conf
│   ├── Clusterfile
│   ├── daemon.json
│   ├── docker.service
│   ├── kubeadm-config.yaml
│   └── kubelet.service
├── images
│   └── registry.tar
├── Kubefile
├── Metadata
├── README.md
├── registry
│   └── docker
│       └── registry
├── scripts
│   ├── clean.sh
│   ├── docker.sh
│   ├── init-kube.sh
│   ├── init-registry.sh
│   ├── init.sh
│   └── kubelet-pre-start.sh
└── statics
    └── audit-policy.yml

etc dir change : add docker config "daemon.json"
docker dir rename to "cri" ,unite docker and containerd
scripts init.sh revision "docker.sh" and "init-kube.sh" , adapt docker and containerd ,different cri we only need to fix "init.sh" and "docker.sh" ,we not revision "init-kube.sh" on different cri

sealer build many times at same cluster image

What happened:

build success , but can't push cluster image. try again build.
image

cd /var/lib/seadent/metadata
ls -l

image

What you expected to happen:

I think it build one image for same content.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

failed build, image Metadata unexpected end of JSON input

[

What happened:

root@iZ2vcfec25u9hygx0c6j8wZ test]# sealer build -t registry.cn-qingdao.aliyuncs.com/sealer-io/dashboard:latest .
2021-05-17 20:37:46 [INFO] init image spec success! image id is 98d54904112b913aa1a2a9aed669f371
2021-05-17 20:37:48 [INFO] read cluster file /var/lib/sealer/Clusterfile success !
2021-05-17 20:37:48 [INFO] create resource success sea.aliyun.com/VpcID: vpc-2vcdj7sf4eyd7jnooqz10
2021-05-17 20:37:48 [INFO] create resource success sea.aliyun.com/ZoneID: cn-chengdu-b
2021-05-17 20:37:53 [INFO] create resource success sea.aliyun.com/VSwitchID: vsw-2vcqmkb2my4qdz80302wa
2021-05-17 20:37:53 [INFO] create resource success sea.aliyun.com/SecurityGroupID: sg-2vc4srgrhjt3pn2ajfys
2021-05-17 20:38:05 [INFO] reconcile master instances success [172.16.0.45 172.16.0.46 172.16.0.44]
2021-05-17 20:38:15 [INFO] reconcile node instances success [172.16.0.47 172.16.0.48 172.16.0.49]
2021-05-17 20:38:18 [INFO] create resource success sea.aliyun.com/EipID: eip-2vc84df0qh7uavpsvkgqf
2021-05-17 20:38:18 [INFO] apply infra success !
2021-05-17 20:38:25 [DEBG] copy files src /usr/local/bin/sealer to dst /usr/local/bin/sealer
2021-05-17 20:38:25 [INFO] [ssh][47.108.188.29] : mkdir -p /usr/local/bin || true
Success to copy /usr/local/bin/sealer to /usr/local/bin/sealer
2021-05-17 20:38:34 [INFO] [ssh][47.108.188.29] : chmod +x /usr/local/bin/sealer
2021-05-17 20:38:34 [INFO] send sealer cmd to 47.108.188.29 success !
2021-05-17 20:38:34 [DEBG] copy files src /tmp/Clusterfile to dst /tmp/Clusterfile
2021-05-17 20:38:34 [INFO] [ssh][47.108.188.29] : mkdir -p /tmp || true
Success to copy /tmp/Clusterfile to /tmp/Clusterfile
2021-05-17 20:38:35 [INFO] send cluster file to 47.108.188.29 success !
2021-05-17 20:38:35 [DEBG] copy files src /root/.docker/config.json to dst /root/.docker/config.json
2021-05-17 20:38:35 [INFO] [ssh][47.108.188.29] : mkdir -p /root/.docker || true
Success to copy /root/.docker/config.json to /root/.docker/config.json
2021-05-17 20:38:35 [INFO] send register info to 47.108.188.29 success !
2021-05-17 20:38:35 [DEBG] copy files src /tmp/98d54904112b913aa1a2a9aed669f371.tar.gz to dst /tmp/98d54904112b913aa1a2a9aed669f371.tar.gz
2021-05-17 20:38:35 [INFO] [ssh][47.108.188.29] : mkdir -p /tmp || true
Success to copy /tmp/98d54904112b913aa1a2a9aed669f371.tar.gz to /tmp/98d54904112b913aa1a2a9aed669f371.tar.gz
2021-05-17 20:38:36 [INFO] [ssh][47.108.188.29] : mkdir -p /var/lib/sealer/my-cluster/workdir && tar zxvf /tmp/98d54904112b913aa1a2a9aed669f371.tar.gz -C /var/lib/sealer/my-cluster/workdir
./
./Kubefile
2021-05-17 20:38:36 [INFO] send build context to 47.108.188.29 success !
2021-05-17 20:38:36 [DEBG] copy files src /var/lib/sealer/Clusterfile to dst /var/lib/sealer/Clusterfile
2021-05-17 20:38:36 [INFO] [ssh][47.108.188.29] : mkdir -p /var/lib/sealer || true
Success to copy /var/lib/sealer/Clusterfile to /var/lib/sealer/Clusterfile
2021-05-17 20:38:36 [INFO] run remote build sealer build -f Kubefile -t registry.cn-qingdao.aliyuncs.com/sealer-io/dashboard:latest -b local .
2021-05-17 20:38:36 [INFO] [ssh][47.108.188.29] : cd /var/lib/sealer/my-cluster/workdir && sealer build -f Kubefile -t registry.cn-qingdao.aliyuncs.com/sealer-io/dashboard:latest -b local .
2021-05-17 20:38:35 [INFO] init image spec success! image id is 1ea19e40edbf82c28295ea8b0d2d5874
Start to Pull Image registry.cn-qingdao.aliyuncs.com/sealer-io/cloudrootfs:v1.16.9-alpha.7
7d3c74ab80e8: pull completed
2021-05-17 20:39:37 [INFO] pull baseImage registry.cn-qingdao.aliyuncs.com/sealer-io/cloudrootfs:v1.16.9-alpha.7 success
Start to Pull Image seadent/cloudrootfs:v1.16.9-alpha.7
9d108943375d: pull completed
2021-05-17 20:40:32 [EMER] ###Exec Panic:load metadata failed,please check image Metadata unexpected end of JSON input
2021-05-17 20:40:32 [EROR] exec command failed Process exited with status 1
2021-05-17 20:40:32 [EROR] failed to run remote build:exec command failed 47.108.188.29 cd /var/lib/sealer/my-cluster/workdir && sealer build -f Kubefile -t registry.cn-qingdao.aliyuncs.com/sealer-io/dashboard:latest -b local .

What you expected to happen:

Kubefile:
FROM registry.cn-qingdao.aliyuncs.com/sealer-io/cloudrootfs:v1.16.9-alpha.7
RUN wget https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml
CMD kubectl apply -f recommended.yaml

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

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.