diff --git a/bin/kadeploy3 b/bin/kadeploy3 index 245f8dcee006c5188379f3d4f528f87bc738ede9..2f0a1373ff012423df0683ff936b9289c38d70b5 100755 --- a/bin/kadeploy3 +++ b/bin/kadeploy3 @@ -65,7 +65,7 @@ class KadeployClient < ClientWorkflow parse_env_name(opt, options){ options[:env_kind] = :database } parse_keyfile(opt, options) parse_deploy_part(opt, options) - add_opt(opt, '-r', '--reformat-tmp FSTYPE', 'Reformat the /tmp partition with the given filesystem type (this filesystem need to be supported by the Deployment Mini OS). Disable with "none"') { |t| + add_opt(opt, '-r', '--reformat-tmp FSTYPE', 'Reformat the /tmp partition with the given filesystem type (this filesystem need to be supported by the deployment environment). Disable with "none"') { |t| options[:reformat_tmp] = t } parse_env_user(opt, options) @@ -98,7 +98,7 @@ class KadeployClient < ClientWorkflow add_opt(opt, "--reboot-kexec-timeout VALUE", "Overload the default timeout for kexec reboots (a ruby expression can be used, 'n' will be replaced by the number of nodes)") { |t| options[:reboot_kexec_timeout] = t } - add_opt(opt, "--force-steps STRING", /^SetDeploymentMiniOS\|(?:\w+:\d+:\d+,?)+&BroadcastEnv\|(?:\w+:\d+:\d+,?)+&BootNewEnv\|(?:\w+:\d+:\d+,?)+$/, "Undocumented, for administration purpose only") { |s| + add_opt(opt, "--force-steps STRING", /^SetDeploymentEnv\|(?:\w+:\d+:\d+,?)+&BroadcastEnv\|(?:\w+:\d+:\d+,?)+&BootNewEnv\|(?:\w+:\d+:\d+,?)+$/, "Undocumented, for administration purpose only") { |s| options[:automata] = {} s.split("&").each do |macrostep| macroname = macrostep.split("|")[0] diff --git a/bin/kareboot3 b/bin/kareboot3 index 8fa6e54b699e628dae6df2ae0ae552695ce0fe52..e7bf7a7e8742d17e3199dc3a2cde274ded243fa9 100755 --- a/bin/kareboot3 +++ b/bin/kareboot3 @@ -51,7 +51,7 @@ class KarebootClient < ClientWorkflow parse_keyfile(opt, options) parse_op_level(opt, options) parse_deploy_part(opt, options) - add_opt(opt, "-r", "--reboot-kind REBOOT_KIND", ['set_pxe', 'simple', 'deployment_mini_os', 'recorded_env'], "Specify the reboot kind (set_pxe, simple, deployment_mini_os, recorded_env)") { |k| + add_opt(opt, "-r", "--reboot-kind REBOOT_KIND", ['set_pxe', 'simple', 'deploy_env', 'recorded_env'], "Specify the reboot kind (set_pxe, simple, deploy_env, recorded_env)") { |k| options[:operation] = k.strip.downcase.to_sym } parse_env_user(opt, options) @@ -75,7 +75,7 @@ class KarebootClient < ClientWorkflow return false end - error("invalid operation #{options[:operation]}") unless [:set_pxe, :simple, :deployment_mini_os, :recorded_env].include?(options[:operation]) + error("invalid operation #{options[:operation]}") unless [:set_pxe, :simple, :deploy_env, :recorded_env].include?(options[:operation]) case options[:operation] when :set_pxe @@ -94,8 +94,8 @@ class KarebootClient < ClientWorkflow end end - if options[:key] and options[:operation] != :deployment_mini_os - error("The -k option can be only used with the deployment_mini_os reboot kind") + if options[:key] and options[:operation] != :deploy_env + error("The -k option can be only used with the deploy_env reboot kind") return false end diff --git a/doc/Kadeploy.pdf b/doc/Kadeploy.pdf index 1bdb1859bc85895a1bb0f55ea6746484c43a3e5f..5edc635ae7b7ef9eb898c21f5e367b44c3c268e7 100644 Binary files a/doc/Kadeploy.pdf and b/doc/Kadeploy.pdf differ diff --git a/doc/Kadeploy.tex b/doc/Kadeploy.tex index e8748a58b49c934d3bef9c5d100ded5ab95f9f8d..d5159350f93e7f43570ef78d08f2511300edfa99 100644 --- a/doc/Kadeploy.tex +++ b/doc/Kadeploy.tex @@ -193,7 +193,7 @@ TFTP_OPTIONS="-v -l -c -s" In order to use the HTTP fetching capabilities of gpxelinux or iPXE, an HTTP server must be configured and must contain the production environment kernel/initrtd -and the deployment mini OS kernel/initrd (see~\ref{sec:specific_config} +and the deployment environment kernel/initrd (see~\ref{sec:specific_config} part). \subsection{MySQL} @@ -753,7 +753,7 @@ external: \begin{itemize} \item \yfieldd{ssh}{Integer}{22} port used by SSH \item \yfieldd{kadeploy\_server}{Integer}{25300} port of the Kadeploy server - \item \yfieldd{test\_deploy\_env}{Integer}{25300} port used as a tag in the deployment mini OS to ensure that the deployment mini OS is successfully booted + \item \yfieldd{test\_deploy\_env}{Integer}{25300} port used as a tag in the deployment environment to ensure that the deployment environment is successfully booted \end{itemize} \item \ypath{/windows/check} @@ -776,9 +776,9 @@ external: \item \ypath{/environments/deployment} \begin{itemize} - \item \yfieldd{extraction\_dir}{String}{/mnt/dest} extraction directory for the tarball in the deployment mino OS - \item \yfieldd{tarball\_dir}{String}{/tmp} destination directory for the tarball download in the deployment mini OS. This is used when the tarballs are sent with Bittorrent. - \item \yfieldd{rambin\_dir}{String}{/rambin} path of the ramdisk directory in the deployment mini OS + \item \yfieldd{extraction\_dir}{String}{/mnt/dest} extraction directory for the tarball in the deployment environment + \item \yfieldd{tarball\_dir}{String}{/tmp} destination directory for the tarball download in the deployment environment. This is used when the tarballs are sent with Bittorrent. + \item \yfieldd{rambin\_dir}{String}{/rambin} path of the ramdisk directory in the deployment environment \end{itemize} \item \ypath{/pxe/dhcp} the default method used to PXE boot. Further information are available in the paragraph \texttt{Booting over the network}. @@ -807,11 +807,11 @@ The information used to generate this filenames are the one specified for each n \item \yfield{concurrency\_level}{Integer} Maximal number of threads that can write to the PXE user custom files sub-directory simultaneously. Default value is 10. \end{itemize} - \item \ypath{/pxe/networkboot} the method used to boot operating system images sent from the network (the deployment mini OS kernel). This setting is optional by default, the DHCP method is used. + \item \ypath{/pxe/networkboot} the method used to boot operating system images sent from the network (the deployment environment kernel). This setting is optional by default, the DHCP method is used. \begin{itemize} \item \yfield{method}{String} the PXE method used to boot the nodes (expected values are PXElinux, LPXElinux, IPXE or GrubPXE) \item \yfield{binary}{String} the binary of the Network Bootstrap Program (if this method is different than the DHCP one, this file will be loaded by the PXE method). For example, for PXElinux, this file is \emph{pxeliux.0}. - \item \yfield{repository}{String} absolute path of the repository where PXE files (deployment mini OS kernels) are accessibles. Warning, as far as the Kadeploy server is launched by the \texttt{deploy} user, \texttt{deploy} must have the rights to write in this directory. + \item \yfield{repository}{String} absolute path of the repository where PXE files (deployment environments kernels) are accessibles. Warning, as far as the Kadeploy server is launched by the \texttt{deploy} user, \texttt{deploy} must have the rights to write in this directory. \end{itemize} \item \ypath{/pxe/networkboot/export} \begin{itemize} @@ -862,7 +862,7 @@ The information used to generate this filenames are the one specified for each n \begin{itemize} \item \yfieldd{connector}{String}{DEFAULT\_CONNECTOR} connector used by Taktuk \item \yfieldd{tree\_arity}{Integer}{0} Taktuk tree arity for command executed through a tree. Use 0 if you want to use the work stealing algorithm of Taktuk and thus a dynamic tree arity. Use another value >0 to specify a static tree arity (should be avoided). - \item \yfieldd{auto\_propagate}{Boolean}{true} use of the auto propagation feature of Taktuk. You should use this feature if the deployment mini OS doesn't contain Taktuk. + \item \yfieldd{auto\_propagate}{Boolean}{true} use of the auto propagation feature of Taktuk. You should use this feature if the deployment environment doesn't contain Taktuk. \item \yfieldd{outputs\_size}{Integer}{20000} to avoid big Taktuk outputs to be loaded in the server's memory, it's possible to setup a limit of the per-node output size. If TakTuk returns an output bigger than \texttt{(NODES\_NUMBER * outputs\_size)} an error will be returned. This limit can be disabled by setting the \texttt{0} value. \end{itemize} @@ -878,7 +878,7 @@ The information used to generate this filenames are the one specified for each n \item \yfieldd{args}{String}{nil} the specific options for this filesystem type \end{itemize} - \item \yfieldd{tar}{String}{''} Options for tar (used in the deployment mini OS) + \item \yfieldd{tar}{String}{''} Options for tar (used in the deployment environment) \item \ypath{/external/kastafior} \begin{itemize} @@ -911,7 +911,7 @@ Some of this softwares gives you the choice of the method used to download the f Kadeploy will boot the nodes three different ways: \begin{itemize} - \item (1) Booting a minimal kernel that was downloaded from the network (done in the first macrostep (SetupDeploymentMiniOS) to boot on the deployment mini OS); + \item (1) Booting a minimal kernel that was downloaded from the network (done in the first macrostep (SetupDeploymentEnv) to boot on the deployment environment); \item (2) Booting a kernel located on a partition of the local hard disk (done in the third macrostep (BootNewEnv) to boot the installed system); \item (3) Booting with some user's custom files with a user specified profile (done when the user is using the options \emph{-x} and \emph{-w}). \end{itemize} @@ -1081,7 +1081,7 @@ hooks: use_ip_to_deploy: true automata: macrosteps: - SetDeploymentMiniOS: + SetDeploymentEnv: - type: Prod timeout: 200 microsteps: @@ -1174,19 +1174,19 @@ automata: \item \yfieldd{params}{String}{""} default kernel parameters applied to a Linux based deployed environment. This can be overloaded in the environment description. \end{itemize} - \item \ypath{/boot/kernels/deploy} The deployment mini OS (see section \ref{sec:deployment}) + \item \ypath{/boot/kernels/deploy} The deployment environment (see section \ref{sec:deployment}) \begin{itemize} - \item \yfield{vmlinuz}{String} name of the kernel file of the deployment mini OS. This file will be specified in the PXE profiles using the \ypath{pxe/networkboot/export} and \ypath{pxe/networkboot/repository} settings of the general configuration file. - \item \yfield{initrd}{String} name of the initrd file of the deployment mini OS. This file will be specified in the PXE profiles using the \ypath{pxe/networkboot/export} and \ypath{pxe/networkboot/repository} settings of the general configuration file. - \item \yfieldd{params}{String}{""} boot parameters of the deployment mini OS - \item \yfieldd{supported\_fs}{String}{ext2,ext3,ext4,vfat} list of file systems that are supported by the deployment mini OS. The syntax is: fstype1,fstype2,fstype3,... . When deploying an environment with a non supported filesystem type, the deployment workflow will be modified (see section \ref{sec:macro_desc}). - \item \yfieldd{drivers}{String}{""} list of drivers that must be loaded in the deployment mini OS. The syntax is: driver1,driver2,driver3,... + \item \yfield{vmlinuz}{String} name of the kernel file of the deployment environment. This file will be specified in the PXE profiles using the \ypath{pxe/networkboot/export} and \ypath{pxe/networkboot/repository} settings of the general configuration file. + \item \yfield{initrd}{String} name of the initrd file of the deployment environment. This file will be specified in the PXE profiles using the \ypath{pxe/networkboot/export} and \ypath{pxe/networkboot/repository} settings of the general configuration file. + \item \yfieldd{params}{String}{""} boot parameters of the deployment environment kernel + \item \yfieldd{supported\_fs}{String}{ext2,ext3,ext4,vfat} list of file systems that are supported by the deployment environment. The syntax is: fstype1,fstype2,fstype3,... . When deploying an environment with a non supported filesystem type, the deployment workflow will be modified (see section \ref{sec:macro_desc}). + \item \yfieldd{drivers}{String}{""} list of drivers that must be loaded in the deployment environment. The syntax is: driver1,driver2,driver3,... \end{itemize} - \item \ypath{/boot/kernels/nfsroot} Used when booting with NFS-root in the \texttt{SetDeploymentMiniOS} macro-step. + \item \ypath{/boot/kernels/nfsroot} Used when booting with NFS-root in the \texttt{SetDeploymentEnv} macro-step. \begin{itemize} - \item \yfieldd{vmlinuz}{String}{""} kernel for the NFS-root deployment mini OS (only used if you use an NFS-root deployment mini OS) - \item \yfieldd{params}{String}{""} kernel parameters for the NFS-root deployment mini OS (only used if you use an NFS-root deployment mini OS) + \item \yfieldd{vmlinuz}{String}{""} kernel for the NFS-root deployment environment (only used if you use an NFS-root deployment environment) + \item \yfieldd{params}{String}{""} kernel parameters for the NFS-root deployment environment (only used if you use an NFS-root deployment environment) \end{itemize} @@ -1238,14 +1238,14 @@ automata: \begin{itemize} \item \yfield{file}{String} the absolute path to the archive containing the scripts \item \yfield{format}{String} the kind of file (expected values are \emph{tgz}, \emph{tbz2}, \emph{tzstd} or \emph{txz}) - \item \yfield{script}{String} the relative path (inside of the archive) to the script to be executed. The \textit{none} value can be if no script must be launched. For debug purpose, you can use the keyword \texttt{breakpoint} instead of a script. Thus, the file will be transferred, the deployment workflow will be stopped and you will be able to connect in the deployment mini OS to debug. + \item \yfield{script}{String} the relative path (inside of the archive) to the script to be executed. The \textit{none} value can be if no script must be launched. For debug purpose, you can use the keyword \texttt{breakpoint} instead of a script. Thus, the file will be transferred, the deployment workflow will be stopped and you will be able to connect in the deployment environment to debug. \end{itemize} \item \ypath{/postinstall/[files]} list of post-install to execute at the post-install of a deployment. This fields are not mandatory. \begin{itemize} \item \yfield{file}{String} the absolute path to the archive containing the scripts \item \yfield{format}{String} the kind of file (expected values are \emph{tgz}, \emph{tbz2}, \emph{tzstd} or \emph{txz}) - \item \yfield{script}{String} the relative path (inside of the archive) to the script to be executed. The \textit{none} value can be if no script must be launched. For debug purpose, you can use the keyword \texttt{breakpoint} instead of a script. Thus, the file will be transferred, the deployment workflow will be stopped and you will be able to connect in the deployment mini OS to debug. + \item \yfield{script}{String} the relative path (inside of the archive) to the script to be executed. The \textit{none} value can be if no script must be launched. For debug purpose, you can use the keyword \texttt{breakpoint} instead of a script. Thus, the file will be transferred, the deployment workflow will be stopped and you will be able to connect in the deployment environment to debug. \end{itemize} \item \ypath{/pxe/headers} PXE headers to be used for the different kind of reboots @@ -1262,21 +1262,21 @@ automata: \end{itemize} \item \ypath{/automata/macrosteps} list of implementations for each macro-steps of the automata. There are 3 macro-steps, so you must specify each of them. - \item \ypath{/automata/macrosteps/[SetDeploymentMiniOS]} the macro-step in charge of rebooting the nodes on the deployment mini OS + \item \ypath{/automata/macrosteps/[SetDeploymentEnv]} the macro-step in charge of rebooting the nodes on the deployment environment \begin{itemize} \item \yfield{type}{String} the type of the macro-step (expected values are \emph{Untrusted}, \emph{Kexec}, \emph{Prod}, \emph{Nfsroot}, \emph{UntrustedCustomPreInstall} and \emph{Dummy}) \item \yfieldd{retries}{Integer}{0} the number of retries for this macro-step (by default, one single attempt with no retries) \item \yfield{timeout}{Integer} the timeout (seconds) of this macro-step \end{itemize} - \item \ypath{/automata/macrosteps/[SetDeploymentMiniOS]/[microsteps]} Microsteps specific configuration (this field is not mandatory) + \item \ypath{/automata/macrosteps/[SetDeploymentEnv]/[microsteps]} Microsteps specific configuration (this field is not mandatory) \begin{itemize} \item \yfield{name}{String} the name of the micro-step, see the list bellow to get the different micro-steps names. \item \yfieldd{timeout}{Integer}{0} the timeout (seconds) of this micro-step \item \yfieldd{retries}{Integer}{0} the number of retries for this micro-step. Since most of micro-steps perform some modifications on the running system and are do not perform any cleaning operation before their execution, be very careful when using this setting. \end{itemize} - \item \ypath{/automata/macrosteps/[SetDeploymentMiniOS]/[microsteps]/[substitute]} Substitute this micro-step with some custom operations (see the paragraph bellow for custom operations description) - \item \ypath{/automata/macrosteps/[SetDeploymentMiniOS]/[microsteps]/[pre-ops]} A list of operations that have to be done before executing the micro-step (see the paragraph bellow for custom operation description) - \item \ypath{/automata/macrosteps/[SetDeploymentMiniOS]/[microsteps]/[post-ops]} A list of custom operations that have to be done after executing the micro-step (see the paragraph bellow for custom operation description) + \item \ypath{/automata/macrosteps/[SetDeploymentEnv]/[microsteps]/[substitute]} Substitute this micro-step with some custom operations (see the paragraph bellow for custom operations description) + \item \ypath{/automata/macrosteps/[SetDeploymentEnv]/[microsteps]/[pre-ops]} A list of operations that have to be done before executing the micro-step (see the paragraph bellow for custom operation description) + \item \ypath{/automata/macrosteps/[SetDeploymentEnv]/[microsteps]/[post-ops]} A list of custom operations that have to be done after executing the micro-step (see the paragraph bellow for custom operation description) \item \ypath{/automata/macrosteps/[BroadcastEnv]} the macro-step in charge of broadcasting the image of the user's environment image on the nodes @@ -1330,18 +1330,18 @@ Here is a custom operation description: \paragraph{The automata macro-steps\\\label{sec:macro_desc}} Here is the list of the macro-step and their implementation: \begin{itemize} -\item \texttt{SetDeploymentMiniOS} +\item \texttt{SetDeploymentEnv} \begin{itemize} - \item \texttt{SetDeploymentMiniOSProd} + \item \texttt{SetDeploymentEnvProd} \begin{itemize} + \item check\_nodes \item format\_deploy\_part \item mount\_deploy\_part \texttt{[only with non-fsa/dd and supported fs]} \item format\_tmp\_part \texttt{[only if non-multipart]} \end{itemize} - \item \texttt{SetDeploymentMiniOSUntrusted} + \item \texttt{SetDeploymentEnvUntrusted} \begin{itemize} \item switch\_pxe - \item set\_default\_vlan \item reboot \item wait\_reboot \item send\_key\_in\_deploy\_env @@ -1351,11 +1351,9 @@ Here is the list of the macro-step and their implementation: \item format\_tmp\_part \texttt{[only if non-multipart]} \item format\_swap\_part \texttt{[only if non-multipart]} \end{itemize} - \item \texttt{SetDeploymentMiniOSKexec} + \item \texttt{SetDeploymentEnvKexec} \begin{itemize} - \item switch\_pxe \item send\_deployment\_kernel - \item set\_default\_vlan \item kexec \item wait\_reboot \item send\_key\_in\_deploy\_env @@ -1366,52 +1364,39 @@ Here is the list of the macro-step and their implementation: \item format\_swap\_part \texttt{[only if non-multipart]} \end{itemize} \item \texttt{SetDeploymentTrusted} \\ - Check if the environement is trusted based on the cluster configuration if so, use \texttt{SetDeploymentMiniOSKexec} else use \texttt{SetDeploymentMiniOSUntrusted}. - \item \texttt{SetDeploymentMiniOSUntrustedCustomPreInstall} + Check if the environement is trusted based on the cluster configuration if so, use \texttt{SetDeploymentEnvKexec} else use \texttt{SetDeploymentEnvUntrusted}. + \item \texttt{SetDeploymentEnvUntrustedCustomPreInstall} \begin{itemize} \item switch\_pxe - \item set\_default\_vlan \item reboot \item wait\_reboot \item send\_key\_in\_deploy\_env \item manage\_admin\_pre\_install \end{itemize} -% \item \texttt{SetDeploymentMiniOSNfsroot} -% \begin{itemize} -% \item switch\_pxe -% \item reboot -% \item wait\_reboot -% \item send\_key\_in\_deploy\_env -% \item create\_partition\_table -% \item format\_deploy\_part \texttt{[only if supported fs]} -% \item mount\_deploy\_part \texttt{[only if non-fsa/dd and supported fs]} -% \item format\_tmp\_part \texttt{[only if non-multipart]} -% \end{itemize} -% \item \texttt{SetDeploymentMiniOSDummy} - \end{itemize} + \item \texttt{SetDeploymentEnvNfsroot} + \begin{itemize} + \item switch\_pxe + \item reboot + \item wait\_reboot + \item send\_key\_in\_deploy\_env + \item create\_partition\_table + \item format\_deploy\_part \texttt{[only if supported fs]} + \item mount\_deploy\_part \texttt{[only if non-fsa/dd and supported fs]} + \item format\_tmp\_part \texttt{[only if non-multipart]} + \end{itemize} + \item \texttt{SetDeploymentEnvDummy} + \end{itemize} \item \texttt{BroadcastEnv} \begin{itemize} - \item \texttt{BroadcastEnvKascade} - \begin{itemize} - \item send\_environment(``kascade'') - \item decompress\_environment \texttt{[only with fsa]} - \item mount\_deploy\_part \texttt{[only with fsa/dd and supported fs]} - \item manage\_admin\_post\_install \texttt{[only if supported fs]} - \item manage\_user\_post\_install \texttt{[only if supported fs]} - \item check\_kernel\_files \texttt{[only if supported fs]} - \item send\_key \texttt{[only if supported fs]} - \item sync - \item install\_bootloader \texttt{[only if supported fs]} - \end{itemize} \item \texttt{BroadcastEnvChain} \begin{itemize} \item send\_environment(``chain'') \item decompress\_environment \texttt{[only with fsa]} + \item mount\_deploy\_part \texttt{[only with fsa/dd and supported fs]} \item manage\_admin\_post\_install \texttt{[only if supported fs]} \item manage\_user\_post\_install \texttt{[only if supported fs]} \item check\_kernel\_files \texttt{[only if supported fs]} \item send\_key \texttt{[only if supported fs]} - \item sync \item install\_bootloader \texttt{[only if supported fs]} \end{itemize} \item \texttt{BroadcastEnvKastafior} @@ -1423,44 +1408,42 @@ Here is the list of the macro-step and their implementation: \item manage\_user\_post\_install \texttt{[only if supported fs]} \item check\_kernel\_files \texttt{[only if supported fs]} \item send\_key \texttt{[only if supported fs]} - \item sync \item install\_bootloader \texttt{[only if supported fs]} \end{itemize} \item \texttt{BroadcastEnvTree} \begin{itemize} \item send\_environment(``tree'') \texttt{[only if supported fs]} \item decompress\_environment \texttt{[only with fsa]} + \item mount\_deploy\_part \texttt{[only with fsa/dd and supported fs]} \item manage\_admin\_post\_install \texttt{[only if supported fs]} \item manage\_user\_post\_install \texttt{[only if supported fs]} \item check\_kernel\_files \texttt{[only if supported fs]} \item send\_key \texttt{[only if supported fs]} - \item sync \item install\_bootloader \texttt{[only if supported fs]} \end{itemize} \item \texttt{BroadcastEnvBittorrent} \begin{itemize} - \item mount\_tmp\_part \item send\_environment(``bittorrent'') \item decompress\_environment \texttt{[only with fsa]} + \item mount\_deploy\_part \texttt{[only with fsa/dd and supported fs]} \item manage\_admin\_post\_install \texttt{[only if supported fs]} \item manage\_user\_post\_install \texttt{[only if supported fs]} \item check\_kernel\_files \texttt{[only if supported fs]} \item send\_key \texttt{[only if supported fs]} - \item sync \item install\_bootloader \texttt{[only if supported fs]} \end{itemize} \item \texttt{BroadcastEnvCustom} \begin{itemize} \item send\_environment(``custom'') \item decompress\_environment \texttt{[only with fsa or if no custom decompress]} + \item mount\_deploy\_part \texttt{[only with fsa/dd and supported fs]} \item manage\_admin\_post\_install \texttt{[only if supported fs]} \item manage\_user\_post\_install \texttt{[only if supported fs]} \item check\_kernel\_files \texttt{[only if supported fs]} \item send\_key \texttt{[only if supported fs]} - \item sync \item install\_bootloader \texttt{[only if supported fs]} \end{itemize} -% \item \texttt{BroadcastEnvDummy} + \item \texttt{BroadcastEnvDummy} \end{itemize} \item \texttt{BootNewEnv} \begin{itemize} @@ -1469,7 +1452,6 @@ Here is the list of the macro-step and their implementation: \item switch\_pxe \item umount\_deploy\_part \texttt{[only if supported fs]} \item reboot\_from\_deploy\_env - \item set\_vlan \texttt{[only if option vlan set]} \item wait\_reboot \end{itemize} \item \texttt{BootNewEnvKexec} \texttt{[only if supported fs and linux]} @@ -1478,16 +1460,15 @@ Here is the list of the macro-step and their implementation: \item umount\_deploy\_part \item mount\_deploy\_part \item kexec - \item set\_vlan \texttt{[only if option vlan set]} \item wait\_reboot \end{itemize} \item \texttt{BootNewEnvHardReboot} \begin{itemize} \item switch\_pxe \item reboot(``hard'') - \item set\_vlan \texttt{[only if option vlan set]} \item wait\_reboot \end{itemize} + \item \texttt{BootNewEnvDummy} \end{itemize} \end{itemize} @@ -1515,7 +1496,7 @@ For a given command on a given cluster, if you specify some group of nodes (with \section{Bootloader install script}\label{sec:bootscript} A script that installs a bootloader on the nodes must be provided for each cluster. -You can use the Kadeploy3 environment variables in your script (see section \ref{sec:env_vars}). The tools you can use in your script are the ones that are installed in your deployment mini OS (see section \ref{sec:deployenv}). +You can use the Kadeploy3 environment variables in your script (see section \ref{sec:env_vars}). The tools you can use in your script are the ones that are installed in your deployment environment (see section \ref{sec:deployenv}). Be careful to install the bootloader on the deployment partition (Kadeploy3 environment variable \texttt{KADEPLOY\_DEPLOY\_PART}) in order for kadeploy to be able to chainload on it. @@ -1524,13 +1505,13 @@ Examples of scripts are provided in the distribution (in the directory \texttt{s \section{Partitioning script}\label{sec:partscript} A partitioning script must be provided for each cluster. -You can use the Kadeploy3 environment variables in your script (see section \ref{sec:env_vars}). The tools you can use in your script are the ones that are installed in your deployment mini OS (see section \ref{sec:deployenv}). +You can use the Kadeploy3 environment variables in your script (see section \ref{sec:env_vars}). The tools you can use in your script are the ones that are installed in your deployment environment (see section \ref{sec:deployenv}). The script must write GPT label on each partition use by Kadeploy3. The label must be prefixed by \texttt{KDPL\_} and end by the disk name (which is given by the \texttt{KADEPLOY\_DISK\_NAME} environment variable). For exemple, \texttt{KDPL\_SWAP\_disk0} is a valid label. The \texttt{SWAP} and \texttt{TMP} label are used to identify the swap and tmp partition. The default deploy partition is specify in the cluster configuration of Kadeploy3. -You should also use the \emph{/sbin/partprobe} at the end of your script to inform the deployment mini OS of partition table changes. +You should also use the \emph{/sbin/partprobe} at the end of your script to inform the OS (deployment environment) of partition table changes. Examples of scripts are provided in the distribution (in the directory \texttt{scripts/partitioning/}). @@ -1580,14 +1561,14 @@ The COMMAND can should be: \end{itemize} -\section{Deployment mini os}\label{sec:deployenv} -There are three ways to set a deployment mini OS: using the production environment, using a dedicated environment, using an NFSRoot environment. +\section{Deployment environment}\label{sec:deployenv} +There are three ways to set a deployment environment: using the production environment, using a dedicated environment, using an NFSRoot environment. \subsection{Configuration of the production environment} TODO \subsection{Creation of the dedicated environment} \subsubsection{Debian: Debirf based method (recommended)} -This methods consists in creating a kernel/initrd that contains all the tools required to perform a deployment. The \emph{debirf} software (\url{http://cmrg.fifthhorseman.net/wiki/debirf}) is to ease the creation of the deployment mini OS. To use these method, go to the \texttt{addons/deploy\_env\_generation/debirf} directory and execute with root rights: +This methods consists in creating a kernel/initrd that contains all the tools required to perform a deployment. The \emph{debirf} software (\url{http://cmrg.fifthhorseman.net/wiki/debirf}) is to ease the creation of the deployment environment. To use these method, go to the \texttt{addons/deploy\_env\_generation/debirf} directory and execute with root rights: \begin{small} \begin{verbatim} > make all @@ -1598,10 +1579,10 @@ The \texttt{kadeploy-deploy-kernel/debirf.conf} configuration file can be tuned You can also add custom debirf modules in the \texttt{kadeploy-deploy-kernel/modules/} directory. You can find a module example named \texttt{blacklist\_example} in this directory. Please refer to debirf documentation for further information. -Once you've executed the make command, you can find the kernel/initrd files of the deployment mini OS in the directory \texttt{kadeploy-deploy-kernel/}. +Once you've executed the make command, you can find the kernel/initrd files of the deployment environment in the directory \texttt{kadeploy-deploy-kernel/}. \subsubsection{Debian: Debootstrap based method} -This methods consists in creating a kernel/initrd that contains all the tools required to perform a deployment. Two scripts are provided to ease the creation of the deployment mini OS. To use these scripts, go to the \texttt{addons/deploy\_env\_generation/debootstrap} directory and execute with root rights: +This methods consists in creating a kernel/initrd that contains all the tools required to perform a deployment. Two scripts are provided to ease the creation of the deployment environment. To use these scripts, go to the \texttt{addons/deploy\_env\_generation/debootstrap} directory and execute with root rights: \begin{small} \begin{verbatim} > sh make_debootstrap.sh @@ -1619,20 +1600,20 @@ The \texttt{make\_kernel.sh} script prompts the user the following things: \item the use of automatic configuration for the new fields in kernel configuration. \end{itemize} -The size of the uncompressed initrd depends on what you have to put in your deployment mini OS. If you use the \texttt{make\_debootstrap.sh} script, the initrd size should be at least 200MB. +The size of the uncompressed initrd depends on what you have to put in your deployment environment. If you use the \texttt{make\_debootstrap.sh} script, the initrd size should be at least 200MB. Depending on the kernel version you choose, the script will fetch the vanilla kernel corresponding to this version. Once a kernel has been fetched, it won't be fetched again in another run. Thus, you have to delete the kernel file if you want to fetch it again. At the opposite, if you do not want to use the sources of the vanilla kernel but your own sources, you can put your own kernel (tar.bz2 compressed) in the current directory. The only requirement is to name the file with the following pattern: linux-\textit{version}.tar.bz2. Then, at the kernel version prompt, just enter the \textit{version} value. After the execution of \texttt{make\_kernel.sh}, a directory prefixed with \texttt{built-} will be created. This directory contains the kernel and the initrd files, prefixed with \texttt{deploy-}. \subsubsection{Centos: Kadeploy provided scripts} -This methods consists in creating a kernel/initrd that contains all the tools required to perform a deployment. A custom ruby script can be used to ease the creation of the deployment mini OS. To use these method, go to the \texttt{addons/deploy\_env\_generation/centirf} directory and execute with root rights: +This methods consists in creating a kernel/initrd that contains all the tools required to perform a deployment. A custom ruby script can be used to ease the creation of the deployment environment. To use these method, go to the \texttt{addons/deploy\_env\_generation/centirf} directory and execute with root rights: \begin{small} \begin{verbatim} > make all \end{verbatim} \end{small} -Once you've executed the make command, you can find the kernel/initrd files of the deployment mini OS in the directory \texttt{centirf/}. +Once you've executed the make command, you can find the kernel/initrd files of the deployment environment in the directory \texttt{centirf/}. \subsection{Creation of the NFSRoot environment} TODO @@ -1776,7 +1757,7 @@ This command performs the deployment of the environment described by the file \t --breakpoint BroadcastEnvKastafior:manage_user_post_install \ -d \end{verbatim} -This kind of command can be used for debug purpose. It performs a deployment with the maximum verbose level and it asks to stop the deployment workflow just before executing the \textit{manage\_user\_post\_install} micro-step of the \textit{BroadcastEnvKastafior} macro-step. Thus you will be able to connect in the deployment mini OS and to debug what you want. Furthermore, the full output of the distant commands performed is shown. +This kind of command can be used for debug purpose. It performs a deployment with the maximum verbose level and it asks to stop the deployment workflow just before executing the \textit{manage\_user\_post\_install} micro-step of the \textit{BroadcastEnvKastafior} macro-step. Thus you will be able to connect in the deployment environment and to debug what you want. Furthermore, the full output of the distant commands performed is shown. \paragraph{Use case 6 - advanced usage - specific PXE profile} \begin{verbatim} @@ -1914,7 +1895,7 @@ At least, Kareboot must be called with one node and a reboot kind. The nodes to \item \texttt{simple\_reboot}: perform a simple reboot of the nodes. Kareboot firstly tries to perform a soft reboot, then a hard reboot is performed and lastly a very hard reboot if it doesn't success before. \item \texttt{set\_pxe}: modify the PXE profile with the one given with the \texttt{-w|-{}-set-pxe-profile} options and perform a simple reboot. \item \texttt{env\_recorded}: perform a reboot on an environment that is already deployed (for instance, the production environment on the production part). This operation must be used with the \texttt{-e} and \texttt{-p} options at least. -\item \texttt{deployment\_mini\_os}: perform a reboot on the deployment mini OS. This can be used with the \texttt{-k|-{}-key} option. +\item \texttt{deploy\_env}: perform a reboot on the deployment environment. This can be used with the \texttt{-k|-{}-key} option. \end{itemize} Here are some basic examples: @@ -2090,13 +2071,13 @@ Explanation of the fields used in the environment description: \begin{itemize} \item \yfield{archive}{String} the path to the archive that contains the scripts (can be local path or URL) \item \yfield{compression}{String} the compression of archive (expected values are \texttt{gzip} or \texttt{bzip2}) - \item \yfieldd{script}{String}{none} the script to execute. For debug purpose, you can use the keyword \texttt{breakpoint} instead of a script. Thus, the file will be transferred, the deployment workflow will be stopped and you will be able to connect in the deployment mini OS to debug. Finally, the script value can be \textit{none} if no script must be launched. Warning, if the \texttt{preinstall} field is fulfilled, the entire \texttt{SetDeploymentEnv} step defined by the administrator will be bypassed. Refer to the~\ref{sec:custom-preinstall} part concerning build of a pre-install. + \item \yfieldd{script}{String}{none} the script to execute. For debug purpose, you can use the keyword \texttt{breakpoint} instead of a script. Thus, the file will be transferred, the deployment workflow will be stopped and you will be able to connect in the deployment environment to debug. Finally, the script value can be \textit{none} if no script must be launched. Warning, if the \texttt{preinstall} field is fulfilled, the entire \texttt{SetDeploymentEnv} step defined by the administrator will be bypassed. Refer to the~\ref{sec:custom-preinstall} part concerning build of a pre-install. \end{itemize} \item \ypath{/[postinstalls]} some post-installation script that will be executed after the environment is sent and installed (useless unless the kind of image is \texttt{tar}). It will only be executed if the filesystem is readable/writable. \begin{itemize} \item \yfield{archive}{String} the path to the archive that contains the scripts (can be local path or URL) \item \yfield{compression}{String} the compression of the archive (expected values are \texttt{gzip} or \texttt{bzip2}) - \item \yfieldd{script}{String}{none} the script to execute. For debug purpose, you can use the keyword \texttt{breakpoint} instead of a script. Thus, the file will be transferred, the deployment workflow will be stopped and you will be able to connect in the deployment mini OS to debug. Finally, the script value can be \textit{none} if no script must be launched. pre-install. + \item \yfieldd{script}{String}{none} the script to execute. For debug purpose, you can use the keyword \texttt{breakpoint} instead of a script. Thus, the file will be transferred, the deployment workflow will be stopped and you will be able to connect in the deployment environment to debug. Finally, the script value can be \textit{none} if no script must be launched. pre-install. \end{itemize} \item \ypath{/boot} information about the system that will be installed (useless if the kind of image is \texttt{dd}) \begin{itemize} diff --git a/lib/kadeploy3/server/config.rb b/lib/kadeploy3/server/config.rb index 369f80721f620d38135956307e5182937a4c3f99..3699d232440f0fc448a3927216cad4156c8ab5e1 100644 --- a/lib/kadeploy3/server/config.rb +++ b/lib/kadeploy3/server/config.rb @@ -197,7 +197,7 @@ module Configuration attr_reader :max_postinstall_size attr_reader :env_name_regex attr_reader :ssh_port - attr_reader :test_deployment_mini_os_port + attr_reader :test_deploy_env_port attr_reader :environment_extraction_dir attr_reader :log_to_db attr_reader :dbg_to_file @@ -298,8 +298,8 @@ module Configuration 'kadeploy_server', Integer, KADEPLOY_PORT ) @ssh_port = cp.value('ssh', Integer, 22) - @test_deployment_mini_os_port = cp.value( - 'test_deployment_mini_os_port', Integer, KADEPLOY_PORT + @test_deploy_env_port = cp.value( + 'test_deploy_env', Integer, KADEPLOY_PORT ) end @@ -956,7 +956,7 @@ module Configuration unless config['automata'] add = {'automata' => { 'macrosteps' => { - 'SetDeploymentMiniOS' => [{ + 'SetDeploymentEnv' => [{ 'timeout' => 200, 'type' => 'Untrusted', 'retries' => 2, @@ -1214,7 +1214,7 @@ module Configuration @workflow_steps << MacroStep.new(macroname, macroinsts) end - treatmacro.call('SetDeploymentMiniOS') + treatmacro.call('SetDeploymentEnv') treatmacro.call('BroadcastEnv') treatmacro.call('BootNewEnv') end @@ -1236,8 +1236,8 @@ module Configuration tmptime = eval(code) @workflow_steps[0].to_a.each do |macroinst| if [ - 'SetDeploymentMiniOSUntrusted', - 'SetDeploymentMiniOSNfsroot', + 'SetDeploymentEnvUntrusted', + 'SetDeploymentEnvNfsroot', ].include?(macroinst[0]) and tmptime > macroinst[2] then raise ArgumentError.new(Parser.errmsg( @@ -1274,7 +1274,7 @@ module Configuration tmptime = eval(code) @workflow_steps[0].to_a.each do |macroinst| - if ['SetDeploymentMiniOSKexec', 'SetDeploymentMiniOSTrusted'].include?(macroinst[0]) && tmptime > macroinst[2] + if ['SetDeploymentEnvKexec', 'SetDeploymentEnvTrusted'].include?(macroinst[0]) && tmptime > macroinst[2] then raise ArgumentError.new(Parser.errmsg( info[:path], "Global kexec timeout is greater than the timeout of the macrostep #{macroinst[0]}" @@ -1508,7 +1508,7 @@ module Configuration ret << MacroStep.new(macrobase, parse_custom_macrostep(cp, macrobase, opts)) end - parse_macro.call('SetDeploymentMiniOS') + parse_macro.call('SetDeploymentEnv') parse_macro.call('BroadcastEnv') parse_macro.call('BootNewEnv') diff --git a/lib/kadeploy3/server/kareboot.rb b/lib/kadeploy3/server/kareboot.rb index b5639aa3682fb57e38e54d156b8fbf6fc338c247..0e6c87785d739038ef0c63826dc0ac162b7f0a25 100644 --- a/lib/kadeploy3/server/kareboot.rb +++ b/lib/kadeploy3/server/kareboot.rb @@ -16,7 +16,7 @@ module Kareboot when :create parse_params(params) do |p| context.operation = p.parse('kind', String, - :values => ['set_pxe', 'simple', 'deployment_mini_os', 'recorded_env'] + :values => ['set_pxe', 'simple', 'deploy_env', 'recorded_env'] ).to_sym context.level = p.parse('level', String, :values => ['soft', 'hard', 'very_hard'], :default => 'soft') diff --git a/lib/kadeploy3/server/macrostep.rb b/lib/kadeploy3/server/macrostep.rb index 76c8f5d7b13f7cce7f2f71a10d7de4bbf0482a47..7995ea885e589bbcd8424d6f902aa0f035664ad1 100644 --- a/lib/kadeploy3/server/macrostep.rb +++ b/lib/kadeploy3/server/macrostep.rb @@ -266,7 +266,7 @@ module Macrostep if ['dd', 'fsa'].include?(cexec.environment.image[:kind]) delete_task(:format_deploy_part, "environment image is #{cexec.environment.image[:kind]}") # mount deploy part after send_environemnt - delete_task(:mount_deploy_partn, "mount deploy part after send_environemnt") if self.class.superclass == DeploySetDeploymentMiniOS + delete_task(:mount_deploy_partn, "mount deploy part after send_environemnt") if self.class.superclass == DeploySetDeploymentEnv else # mount deploy part after format_deploy_part delete_task(:mount_deploy_part, "mount deploy part after format_deploy_part") if self.class.superclass == DeployBroadcastEnv diff --git a/lib/kadeploy3/server/microsteps.rb b/lib/kadeploy3/server/microsteps.rb index e5177180b59e6f5e1ee07180bad72fcd6af032c2..8779f2bb00518373cdd40fff4b6f50822014506c 100644 --- a/lib/kadeploy3/server/microsteps.rb +++ b/lib/kadeploy3/server/microsteps.rb @@ -1989,12 +1989,12 @@ class Microstep < Automata::QueueTask unless ports_up ports_up = [context[:common].ssh_port] - ports_up << context[:common].test_deployment_mini_os_port if env == 'deploy' + ports_up << context[:common].test_deploy_env_port if env == 'deploy' end unless ports_down ports_down = [] - ports_down << context[:common].test_deployment_mini_os_port if env == 'user' + ports_down << context[:common].test_deploy_env_port if env == 'user' end init_nodes( diff --git a/lib/kadeploy3/server/stepdeploy.rb b/lib/kadeploy3/server/stepdeploy.rb index 92084f9491e34a30baeabae5e57121313bfe49af..1959add7f993183409ec121361897f95e918b73c 100644 --- a/lib/kadeploy3/server/stepdeploy.rb +++ b/lib/kadeploy3/server/stepdeploy.rb @@ -3,13 +3,13 @@ module Kadeploy module Macrostep ######################## -### SetDeploymentMiniOS ### +### SetDeploymentEnv ### ######################## - class DeploySetDeploymentMiniOS < Deploy + class DeploySetDeploymentEnv < Deploy end - class DeploySetDeploymentMiniOSUntrusted < DeploySetDeploymentMiniOS + class DeploySetDeploymentEnvUntrusted < DeploySetDeploymentEnv def steps() [ [:switch_pxe, "prod_to_deploy_env", ""], @@ -26,7 +26,7 @@ module Macrostep end end - class DeploySetDeploymentMiniOSKexec < DeploySetDeploymentMiniOS + class DeploySetDeploymentEnvKexec < DeploySetDeploymentEnv def steps() [ [:switch_pxe, "prod_to_deploy_env", ""], @@ -44,12 +44,12 @@ module Macrostep end end - # Same as DeploySetDeploymentMiniOSKexec, but we override to Untrused if the last + # Same as DeploySetDeploymentEnvKexec, but we override to Untrused if the last # env is not trusted in runtime - class DeploySetDeploymentMiniOSTrusted < DeploySetDeploymentMiniOSKexec + class DeploySetDeploymentEnvTrusted < DeploySetDeploymentEnvKexec end - class DeploySetDeploymentMiniOSUntrustedCustomPreInstall < DeploySetDeploymentMiniOS + class DeploySetDeploymentEnvUntrustedCustomPreInstall < DeploySetDeploymentEnv def steps() [ [:switch_pxe, "prod_to_deploy_env"], @@ -62,7 +62,7 @@ module Macrostep end end - class DeploySetDeploymentMiniOSProd < DeploySetDeploymentMiniOS + class DeploySetDeploymentEnvProd < DeploySetDeploymentEnv def steps() [ [:format_deploy_part], @@ -72,7 +72,7 @@ module Macrostep end end - class DeploySetDeploymentMiniOSNfsroot < DeploySetDeploymentMiniOS + class DeploySetDeploymentEnvNfsroot < DeploySetDeploymentEnv def steps() [ [:switch_pxe, "prod_to_nfsroot_env"], @@ -89,7 +89,7 @@ module Macrostep end end - class DeploySetDeploymentMiniOSDummy < DeploySetDeploymentMiniOS + class DeploySetDeploymentEnvDummy < DeploySetDeploymentEnv def steps() [ [:dummy], diff --git a/lib/kadeploy3/server/stepreboot.rb b/lib/kadeploy3/server/stepreboot.rb index 14da6858b952b0a2f85a89101f125703a6865b01..903c350fc5789583e37a257a3a4c55d4644f69d9 100644 --- a/lib/kadeploy3/server/stepreboot.rb +++ b/lib/kadeploy3/server/stepreboot.rb @@ -22,7 +22,7 @@ module Macrostep end end - class RebootDeploymentMiniOS < Reboot + class RebootDeployEnv < Reboot def steps() [ [:switch_pxe, 'prod_to_deploy_env'], diff --git a/lib/kadeploy3/server/workflow.rb b/lib/kadeploy3/server/workflow.rb index 03d2717dc65695a410d0906fa7d3a8d86d50724a..cc9a4903024cf61dffd0f2bbe50dfb9625064079 100644 --- a/lib/kadeploy3/server/workflow.rb +++ b/lib/kadeploy3/server/workflow.rb @@ -462,17 +462,17 @@ module Workflow instances = macrosteps[0].to_a # use same values the first instance is using tmp = [ - 'SetDeploymentMiniOSUntrustedCustomPreInstall', + 'SetDeploymentEnvUntrustedCustomPreInstall', *instances[0][1..-1] ] instances.clear instances << tmp debug(0, "A specific presinstall will be used with this environment") end - # SetDeploymentMiniOS step + # SetDeploymentEnv step macrosteps[0].to_a.each do |instance| - if (context[:execution].dont_trust_env || context[:execution].environment.options['trust_env'] == false || !last_deploy_is_trusted?) && instance[0] == 'SetDeploymentMiniOSTrusted' - instance[0] = 'SetDeploymentMiniOSUntrusted' + if (context[:execution].dont_trust_env || context[:execution].environment.options['trust_env'] == false || !last_deploy_is_trusted?) && instance[0] == 'SetDeploymentEnvTrusted' + instance[0] = 'SetDeploymentEnvUntrusted' instance[1] = 0 instance[2] = eval("(#{context[:cluster].timeout_reboot_classical})+200").to_i debug_message_reason = if context[:execution].dont_trust_env @@ -613,8 +613,8 @@ module Workflow step = [['Simple', 0, 0]] when :set_pxe step = [['SetPXE', 0, 0]] - when :deployment_mini_os - step = [['DeploymentMiniOS', 0, 0]] + when :deploy_env + step = [['DeployEnv', 0, 0]] when :recorded_env step = [['RecordedEnv', 0, 0]] else diff --git a/vagrant-env/kadeploy_conf/sample-cluster.conf b/vagrant-env/kadeploy_conf/sample-cluster.conf index a5d7dc88b492002b45e3c59efde71fa490416272..4eef65d6ccae147dd1563964450f138368e351da 100644 --- a/vagrant-env/kadeploy_conf/sample-cluster.conf +++ b/vagrant-env/kadeploy_conf/sample-cluster.conf @@ -76,7 +76,7 @@ automata: - timeout: 300 type: Kascade retries: 2 - SetDeploymentMiniOS: + SetDeploymentEnv: - timeout: 200 type: Trusted retries: 2 diff --git a/vagrant-env/kadeploy_conf/server.conf b/vagrant-env/kadeploy_conf/server.conf index ec7f35f53282cd43d7c717796de7fa2771321406..ad36468d86238c7466cd94b344ad05edcf79b38c 100644 --- a/vagrant-env/kadeploy_conf/server.conf +++ b/vagrant-env/kadeploy_conf/server.conf @@ -47,7 +47,7 @@ network: script: /vagrant/scripts/set_vlan server_hostname: vagrant_machine ports: - test_deployment_mini_os: 25300 + test_deploy_env: 25300 kadeploy_server: 25301 windows: reboot: