Migrate traditional clients to Salt clients
To migrate a system from a traditional client to a Salt, user can create the Salt bootstrap script and re-register the client system with it.
This could be done with three procedures: * create a bootstrap script, * modify the bootstrap script, and * run the bootstrap script to register the client.
1. Create bootstrap script
First you create a bootstrap script with the Web UI as a template.
-
SUSE ManagerのWeb UIで、
に移動します。 -
In the
SUSE Manager Configuration - Bootstrap
dialog, verify that theBootstrap using Salt
checkbox is checked. -
The required fields are pre-populated with values derived from previous installation steps. For details on each setting, see ブートストラップスクリプト.
-
更新をクリックしてスクリプトを作成します。
-
The bootstrap script is generated and stored on the server in the
/srv/www/htdocs/pub/bootstrap
directory. Alternatively, you can access the bootstrap script over HTTPS. Replace<example.com>
with the host name of your SUSE Manager Server:https://<example.com>/pub/bootstrap/bootstrap.sh
2. Modify bootstrap script
In the next step, you modify the bootstrap script as needed. It is important that you set your activation key. Navigate to Tasks
box, click Manage Activation Keys
. All keys created for channels are listed on this page. Enter the full name of the key you wish to use in the bootstrap script exactly as presented in the key field. For more information about activation keys, see アクティベーションキー.
-
SUSE Managerサーバのコマンドラインでrootとして、ブートストラップディレクトリを次のように変更します。
cd /srv/www/htdocs/pub/bootstrap/
-
Create a copy of the template bootstrap script for use with each of your clients.
cp bootstrap.sh bootstrap-migrate-to-salt.sh
-
Open
bootstrap-migrate-to-salt.sh
for modification. Scroll down until you can see the text shown below. Ifexit 1
exists in the file, comment it out by typing a hash or pound sign (#) at the beginning of the line. This activates the script. Enter the name of the key for this script in theACTIVATION_KEYS=
field:echo "Enable this script: comment (with #'s) this block (or, at least just" echo "the exit below)" echo #exit 1 # can be edited, but probably correct (unless created during initial install): # NOTE: ACTIVATION_KEYS *must* be used to bootstrap a client machine. ACTIVATION_KEYS=1-migrate-salt ORG_GPG_KEY=
-
When you have finished, save the file.
By default, the bootstrap script will try to install 詳細については、Salt Bundleを参照してください。 |
3. Run bootstrap script
As the final step, run the bootstrap script to migrate and register clients.
-
On the SUSE Manager Server, log in as root. At the command prompt, change to the bootstrap directory:
cd /srv/www/htdocs/pub/bootstrap/
-
Run the following command to execute the bootstrap script on the client. Replace
EXAMPLE.COM
with the hostname of your client:cat bootstrap-migrate-to-salt.sh | ssh root@EXAMPLE.COM /bin/bash
-
Alternatively, on the client, run the command:
curl -Sks https://server_hostname/pub/bootstrap/bootstrap-migrate-to-salt.sh | /bin/bash
The script downloads the required dependencies.
-
スクリプトの実行が完了すると、クライアントが正しく登録されたかどうかを確認できます。そのためには、SUSE ManagerのWeb UIを開き、
に移動して、新しいクライアントがリストされていることを確認します。 -
In case of trouble with registering the new Salt client, open the SUSE Manager Web UI and navigate to
to accept the client key.
SUSE Managerを使用してクライアントに新しいパッケージまたは更新がインストールされると、エンドユーザライセンスアグリーメント(EULA)が自動的に受け入れられます。 パッケージのEULAを確認するには、Web UIでパッケージ詳細ページを開きます。 |
For more information about using bootstrap scripts, see ブートストラップスクリプトを使用してクライアントを登録する.