-
Notifications
You must be signed in to change notification settings - Fork 541
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…t/deploy guest (#18823) * feat(region): add guest rescue api && download initrd from baremetal tftp server && add baremetal agent ip finder & update pic address & support ip kernel config. * feat(host-deployer): use qemu-kvm as default deploy dirver --------- Co-authored-by: [email protected] <[email protected]>
- Loading branch information
Showing
37 changed files
with
1,741 additions
and
415 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-deployer-base:1.5 | ||
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunionos:v0.1.9-20231129.0 as yunionos | ||
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-deployer-base:1.4.2 | ||
|
||
MAINTAINER "Yaoqi Wan [email protected]" | ||
|
||
ENV TZ UTC | ||
|
||
RUN mkdir -p /opt/yunion/bin | ||
RUN mkdir -p /yunionos/x86_64 | ||
RUN mkdir -p /yunionos/aarch64 | ||
|
||
|
||
COPY --from=yunionos /yunionos/x86_64/initramfs /yunionos/x86_64/initramfs | ||
COPY --from=yunionos /yunionos/x86_64/kernel /yunionos/x86_64/kernel | ||
COPY --from=yunionos /yunionos/aarch64/kernel /yunionos/aarch64/kernel | ||
COPY --from=yunionos /yunionos/aarch64/initramfs /yunionos/aarch64/initramfs | ||
|
||
|
||
ADD ./_output/centos-build/bin/host-deployer /opt/yunion/bin/host-deployer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright 2019 Yunion | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package deploy_iface | ||
|
||
import ( | ||
"yunion.io/x/onecloud/pkg/hostman/guestfs/fsdriver" | ||
"yunion.io/x/onecloud/pkg/hostman/hostdeployer/apis" | ||
) | ||
|
||
type IDeployer interface { | ||
Connect(desc *apis.GuestDesc) error | ||
Disconnect() error | ||
|
||
GetPartitions() []fsdriver.IDiskPartition | ||
IsLVMPartition() bool | ||
Zerofree() | ||
ResizePartition() error | ||
FormatPartition(fs, uuid string) error | ||
MakePartition(fs string) error | ||
|
||
MountRootfs(readonly bool) (fsdriver.IRootFsDriver, error) | ||
UmountRootfs(fd fsdriver.IRootFsDriver) error | ||
DetectIsUEFISupport(rootfs fsdriver.IRootFsDriver) bool | ||
|
||
DeployGuestfs(req *apis.DeployParams) (res *apis.DeployGuestFsResponse, err error) | ||
ResizeFs() (res *apis.Empty, err error) | ||
FormatFs(req *apis.FormatFsParams) (*apis.Empty, error) | ||
SaveToGlance(req *apis.SaveToGlanceParams) (*apis.SaveToGlanceResponse, error) | ||
ProbeImageInfo(req *apis.ProbeImageInfoPramas) (*apis.ImageInfo, error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright 2019 Yunion | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package deploy_iface // import "yunion.io/x/onecloud/pkg/hostman/diskutils/deploy_iface" |
Oops, something went wrong.