mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
move the preInstall into the first stage
This commit is contained in:
parent
6c1581d355
commit
c098865f00
|
|
@ -92,7 +92,6 @@ type CustomScripts struct {
|
|||
|
||||
// System defines the system config for each node in cluster.
|
||||
type System struct {
|
||||
Initials []CustomScripts `yaml:"initials" json:"initials,omitempty"`
|
||||
NtpServers []string `yaml:"ntpServers" json:"ntpServers,omitempty"`
|
||||
Timezone string `yaml:"timezone" json:"timezone,omitempty"`
|
||||
Rpms []string `yaml:"rpms" json:"rpms,omitempty"`
|
||||
|
|
|
|||
|
|
@ -58,14 +58,13 @@ func NewCreateClusterPipeline(runtime *common.KubeRuntime) error {
|
|||
|
||||
m := []module.Module{
|
||||
&precheck.GreetingsModule{},
|
||||
&customscripts.CustomScriptsModule{Phase: "Initial", Scripts: runtime.Cluster.System.Initials},
|
||||
&customscripts.CustomScriptsModule{Phase: "PreInstall", Scripts: runtime.Cluster.System.PreInstall},
|
||||
&precheck.NodePreCheckModule{},
|
||||
&confirm.InstallConfirmModule{},
|
||||
&artifact.UnArchiveModule{Skip: noArtifact},
|
||||
&os.RepositoryModule{Skip: noArtifact || !runtime.Arg.InstallPackages},
|
||||
&binaries.NodeBinariesModule{},
|
||||
&os.ConfigureOSModule{Skip: runtime.Cluster.System.SkipConfigureOS},
|
||||
&customscripts.CustomScriptsModule{Phase: "PreInstall", Scripts: runtime.Cluster.System.PreInstall},
|
||||
&kubernetes.StatusModule{},
|
||||
&container.InstallContainerModule{},
|
||||
&images.CopyImagesToRegistryModule{Skip: skipPushImages},
|
||||
|
|
|
|||
|
|
@ -42,22 +42,13 @@ spec:
|
|||
# Specify additional packages to be installed. The ISO file which is contained in the artifact is required.
|
||||
debs:
|
||||
- nfs-common
|
||||
# initials:
|
||||
# - name: Install hd tool
|
||||
# bash: curl https://gitee.com/linuxsuren/tools/raw/master/install-zh.sh|bash
|
||||
# - name: Install packages
|
||||
# bash: |
|
||||
# hd setup --proxy ghproxy.com --provider gitee
|
||||
# hd i chrony
|
||||
# hd i conntrack
|
||||
# hd i socat
|
||||
#preInstall: # Specify custom init shell scripts for each nodes, and execute according to the list order before install container runtime.
|
||||
#preInstall: # Specify custom init shell scripts for each nodes, and execute according to the list order at the first stage.
|
||||
# - name: format and mount disk
|
||||
# bash: /bin/bash -x setup-disk.sh
|
||||
# materials: # scripts can has some dependency materials. those will copy to the node
|
||||
# - ./setup-disk.sh # the script which shell execute need
|
||||
# - xxx # other tools materials need by this script
|
||||
#postInstall: # Specify custom finish clean up shell scripts for each nodes after the kubernetes install.
|
||||
#postInstall: # Specify custom finish clean up shell scripts for each nodes after the Kubernetes install.
|
||||
# - name: clean tmps files
|
||||
# bash: |
|
||||
# rm -fr /tmp/kubekey/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue