総数:56 今日:1 昨日:0
参考URL https://linuxconfig.org/how-to-install-ssh-server-on-ubuntu-16-04-xenial-linux
$ sudo apt-get install ssh
パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 以下の追加パッケージがインストールされます: ncurses-term openssh-server openssh-sftp-server ssh-import-id 提案パッケージ: ssh-askpass rssh molly-guard monkeysphere 以下のパッケージが新たにインストールされます: ncurses-term openssh-server openssh-sftp-server ssh ssh-import-id アップグレード: 0 個、新規インストール: 5 個、削除: 0 個、保留: 4 個。 643 kB のアーカイブを取得する必要があります。 この操作後に追加で 5,244 kB のディスク容量が消費されます。 続行しますか? [Y/n] Y 取得:1 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main amd64 openssh-sftp-server amd64 1:7.2p2-4ubuntu2.1 [38.8 kB] 取得:2 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main amd64 openssh-server amd64 1:7.2p2-4ubuntu2.1 [338 kB] 取得:3 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main amd64 ssh all 1:7.2p2-4ubuntu2.1 [7,070 B] 取得:4 http://jp.archive.ubuntu.com/ubuntu xenial/main amd64 ncurses-term all 6.0+20160213-1ubuntu1 [249 kB] 取得:5 http://jp.archive.ubuntu.com/ubuntu xenial/main amd64 ssh-import-id all 5.5-0ubuntu1 [10.2 kB] 643 kB を 0秒 で取得しました (2,945 kB/s) パッケージを事前設定しています ... 以前に未選択のパッケージ openssh-sftp-server を選択しています。 (データベースを読み込んでいます ... 現在 187369 個のファイルとディレクトリがインストールされています。) .../openssh-sftp-server_1%3a7.2p2-4ubuntu2.1_amd64.deb を展開する準備をしています ... openssh-sftp-server (1:7.2p2-4ubuntu2.1) を展開しています... 以前に未選択のパッケージ openssh-server を選択しています。 .../openssh-server_1%3a7.2p2-4ubuntu2.1_amd64.deb を展開する準備をしています ... openssh-server (1:7.2p2-4ubuntu2.1) を展開しています... 以前に未選択のパッケージ ssh を選択しています。 .../ssh_1%3a7.2p2-4ubuntu2.1_all.deb を展開する準備をしています ... ssh (1:7.2p2-4ubuntu2.1) を展開しています... 以前に未選択のパッケージ ncurses-term を選択しています。 .../ncurses-term_6.0+20160213-1ubuntu1_all.deb を展開する準備をしています ... ncurses-term (6.0+20160213-1ubuntu1) を展開しています... 以前に未選択のパッケージ ssh-import-id を選択しています。 .../ssh-import-id_5.5-0ubuntu1_all.deb を展開する準備をしています ... ssh-import-id (5.5-0ubuntu1) を展開しています... man-db (2.7.5-1) のトリガを処理しています ... systemd (229-4ubuntu10) のトリガを処理しています ... ureadahead (0.100.0-19) のトリガを処理しています ... ureadahead will be reprofiled on next reboot ufw (0.35-0ubuntu2) のトリガを処理しています ... openssh-sftp-server (1:7.2p2-4ubuntu2.1) を設定しています ... openssh-server (1:7.2p2-4ubuntu2.1) を設定しています ... Creating SSH2 RSA key; this may take some time ... 2048 SHA256:EEoY9zH7S7NKv2zcSnjfgyXou82OytYuL3xXkYbA6X4 root@ryu (RSA) Creating SSH2 DSA key; this may take some time ... 1024 SHA256:wcQxlpVBJ7VEQg8WBg8ZB7smHQYsCAbrUwW2kaUqd+8 root@ryu (DSA) Creating SSH2 ECDSA key; this may take some time ... 256 SHA256:2oqyKIXQ7SHlo9PzpyZ+JYKplh12BJYobVd1BCy4Ag0 root@ryu (ECDSA) Creating SSH2 ED25519 key; this may take some time ... 256 SHA256:davM55b/rU4zBUXbc+JqZ/UoYB3HmrJBGC0KtfGx7Jo root@ryu (ED25519) ssh (1:7.2p2-4ubuntu2.1) を設定しています ... ncurses-term (6.0+20160213-1ubuntu1) を設定しています ... ssh-import-id (5.5-0ubuntu1) を設定しています ... systemd (229-4ubuntu10) のトリガを処理しています ... ureadahead (0.100.0-19) のトリガを処理しています ... ufw (0.35-0ubuntu2) のトリガを処理しています ...
$ sudo service ssh start
$ sudo systemctl enable ssh
Synchronizing state of ssh.service with SysV init with /lib/systemd/systemd-sysv-install... Executing /lib/systemd/systemd-sysv-install enable ssh
下記を参考に操作するWindowsの共有フォルダを自動マウントするようにしておく
http://foxtail.lv9.org/wiki/doc/pukiwiki-1_5_1_utf8/index.php?mount%20command#o9dce617
~$ wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add - OK
~$ sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
~$ sudo apt-get update
ヒット:1 http://jp.archive.ubuntu.com/ubuntu xenial InRelease 取得:2 http://jp.archive.ubuntu.com/ubuntu xenial-updates InRelease [95.7 kB] ヒット:3 http://jp.archive.ubuntu.com/ubuntu xenial-backports InRelease 取得:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB] 無視:5 http://pkg.jenkins.io/debian-stable binary/ InRelease 取得:6 http://pkg.jenkins.io/debian-stable binary/ Release [2,042 B] 取得:7 http://pkg.jenkins.io/debian-stable binary/ Release.gpg [181 B] 取得:8 http://pkg.jenkins.io/debian-stable binary/ Packages [658 B] 193 kB を 1秒 で取得しました (121 kB/s) パッケージリストを読み込んでいます... 完了 W: http://pkg.jenkins.io/debian-stable/binary/Release.gpg: 鍵 150FDE3F7787E7D11EF4E12A9B7D32F2D50582E6 による署名は弱い digest アルゴリズム (SHA1) を使用しています
~$ sudo apt-get install jenkins
パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 以下の追加パッケージがインストールされます: daemon 以下のパッケージが新たにインストールされます: daemon jenkins アップグレード: 0 個、新規インストール: 2 個、削除: 0 個、保留: 4 個。 69.0 MB のアーカイブを取得する必要があります。 この操作後に追加で 70.1 MB のディスク容量が消費されます。 続行しますか? [Y/n] Y 取得:1 http://jp.archive.ubuntu.com/ubuntu xenial/universe amd64 daemon amd64 0.6.4-1 [98.2 kB] 取得:2 http://pkg.jenkins.io/debian-stable binary/ jenkins 2.19.1 [68.9 MB] 69.0 MB を 10秒 で取得しました (6,299 kB/s) 以前に未選択のパッケージ daemon を選択しています。 (データベースを読み込んでいます ... 現在 190132 個のファイルとディレクトリがインストールされています。) .../daemon_0.6.4-1_amd64.deb を展開する準備をしています ... daemon (0.6.4-1) を展開しています... 以前に未選択のパッケージ jenkins を選択しています。 .../jenkins_2.19.1_all.deb を展開する準備をしています ... jenkins (2.19.1) を展開しています... man-db (2.7.5-1) のトリガを処理しています ... systemd (229-4ubuntu10) のトリガを処理しています ... ureadahead (0.100.0-19) のトリガを処理しています ... daemon (0.6.4-1) を設定しています ... jenkins (2.19.1) を設定しています ... systemd (229-4ubuntu10) のトリガを処理しています ... ureadahead (0.100.0-19) のトリガを処理しています ...
~$ sudo gvim -f /etc/default/jenkins
例: HTTP_PORT=4000
編集例
~$ colordiff -pu /etc/default/jenkins.default /etc/default/jenkins
--- /etc/default/jenkins.default 2016-10-05 00:20:48.000000000 +0900 +++ /etc/default/jenkins 2016-10-10 18:17:07.879767718 +0900 @@ -10,6 +10,7 @@ JAVA=/usr/bin/java JAVA_ARGS="-Djava.awt.headless=true" # Allow graphs etc. to work even when an X server is present #JAVA_ARGS="-Xmx256m" #JAVA_ARGS="-Djava.net.preferIPv4Stack=true" # make jenkins listen on IPv4 address +JAVA_ARGS="-Dfile.encoding=utf-8" # avoid garbled characters in Git Plugin PIDFILE=/var/run/$NAME/$NAME.pid @@ -54,8 +55,8 @@ MAXOPENFILES=8192 # UMASK=027 # port for HTTP connector (default 8080; disable with -1) -HTTP_PORT=8080 - +#HTTP_PORT=8080 +HTTP_PORT=4000 # servlet context, important if you want to use apache proxying PREFIX=/$NAME @@ -69,4 +70,4 @@ PREFIX=/$NAME # --webroot=~/.jenkins/war # --prefix=$PREFIX -JENKINS_ARGS="--webroot=/var/cache/$NAME/war --httpPort=$HTTP_PORT" +JENKINS_ARGS="--webroot=/var/cache/$NAME/war --httpPort=$HTTP_PORT --prefix=/jenkins"
~$ sudo service jenkins restart * Restarting Jenkins Continuous Integration Server jenkins
http://<hostname>:<port>/jenkins/
/var/lib/jenkins/secrets/initialAdminPassword
Username: jenkins Password: プリセットされている Confirm password: 同じのを入力する Full name: <your name> E-mail address: <your email address>
You've skipped creating an admin user. To log in, use the username: 'admin' and the administrator password you used to access the setup wizard.
http://<hostname>:<port>/jenkins/
Username: admin Password: <Administrator password>
| プラグイン | 説明 | 備考 |
| Javadoc Plugin | This plugin adds Javadoc support to Jenkins. | その他 (website) |
| Filesystem Trigger Plug-in | FSTrigger provides polling mechanisms to monitor a file system and trigger a build if a file or a set of files have changed. | ビルドトリガ |
| Shelve Project Plugin | This plugin lets you shelve projects so that they can easily be resurrected. | その他 (website) ユーザーインタフェース |
| Translation Assistance plugin | This plugin adds an additional dialog box in every page, which enables people to contribute localizations for the messages they are seeing in the current page | ユーザーインタフェース |
| Maven Integration plugin | This plugin provides an advanced integration for Maven 2/3 projects. | ビルドツール |
| Job Configuration History Plugin | Saves copies of all job and system configurations. | その他 (website) ユーザーインタフェース |
| Parameterized Trigger plugin | This plugin lets you trigger new builds when your build has completed, with various ways of specifying parameters for the new build. | その他 (website) |
| Hudson Seleniumhq plugin | This plugin allows you to run and load HTML Selenese suite result generate by Selenium Server from Seleniumhq. Jenkins will generate the trend report of test result. | ビルドツール ビルドレポート |
| CVS Plug-in | This bundled plugin integrates Jenkins with CVS version control system. | ソース管理システム |
| Copy Artifact Plugin | This bundled plugin integrates Jenkins with CVS version control system. | ソース管理システム |
| Join plugin | This plugin allows a job to be run after all the immediate downstream jobs have completed. | ビルドトリガ |
| Files Found Trigger | Build trigger that polls one or more directories and starts a build if certain files are found within those directories. | ビルドトリガ |
| Lockable Resources plugin | This plugin allows to define lockable resources (such as printers, phones, computers, etc.) that can be used by builds. If a build requires an resource which is already locked, it will wait for the resource to be free. One can define a lock-priority globally and on a per-job basis. | Agent Launchers and Controllers |
| disk-usage plugin | This plugin records disk usage. | ビルドレポート |
| SSH Agent Plugin | This plugin allows you to provide SSH credentials to builds via a ssh-agent in Jenkins. | その他 (website) |
| Rebuilder | This plug-in allows the user to _rebuild_ a _parametrized build_ without entering the _parameters_ again.It will also allow the user to edit the parameters before rebuilding. | その他 (website) |
| Gerrit Trigger | This plugin integrates Jenkins to Gerrit code review for triggering builds when a "patch set" is created. | ビルドトリガ |
| Copy To Slave Plugin | This plugin allows to copy a set of files, from a location somewhere on the master node, to jobs' workspaces. It also allows to copy files back from the workspaces of jobs located on a slave node to their workspaces on the master one. | Agent Launchers and Controllers ビルドラッパー ビルド通知 |
| ThinBackup | This plugin simply backs up the global and job specific configurations (not the archive or the workspace). | その他 (website) |
| Mask Passwords Plugin | This plugin allows masking passwords that may appear in the console | その他 (website) ビルドラッパー |
| Build Trigger Badge Plugin | This plugin displays icon(s) representing the cause(s) of a build directly in the build history. It lets you quickly know which cause triggered a build. | ユーザーインタフェース |
| jQuery plugin | This plugin is a library plugin for other plugins to share common jQuery. It also allows users to use jQuery on each view descriptions. | Library plugins (for use by other plugins) |
| Node and Label parameter plugin | This plugin adds two new parameter types to job configuration - node and label, this allows to dynamically select the node where a job/project should be executed. | Agent Launchers and Controllers Build Parameters ビルドトリガ |
| Build Pipeline Plugin | This plugin provides a _Build Pipeline View_ of upstream and downstream connected jobs that typically form a build pipeline. In addition, it offers the ability to define manual triggers for jobs that require intervention prior to execution, e.g. an approval process outside of Jenkins. | ビルドツール ビルド後のアクション ユーザーインタフェース |
| Publish Over CIFS | Send build artifacts to a windows share (CIFS/SMB/samba) | 成果物のアップロード |
| Selenium Auto Exec Server(AES) plugin | This plugin is for continuous regression test by Selenium Auto Exec Server (AES). | ビルドツール ビルドレポート |
| Mercurial plugin | This plugin integrates the Mercurial version control system with Jenkins. | ソース管理システム |
| Associated Files Plugin | This plugin allows for marking files or directories outside of Jenkins as related to a build. | ビルド後のアクション |
| Hudson Locks and Latches plugin | This plugin allows you to control the parallel execution of jobs. | ビルドトリガ ビルドラッパー |
| File System SCM | Use File System as SCM. | ソース管理システム |
| Role-based Authorization Strategy | Adds a new role-based strategy to manage users' permissions. | Security 認証/ユーザー管理 |
参考URL http://qiita.com/west-hiroaki/items/410a76c96ad57c8cb547
ユーザー名: john パスワード: john パスワードの確認: john フルネーム: John Smith メールアドレス: john@smith
プラグインをインストールした直後は、全てのアクションが可能なadmin権限しか無いので、その他の権限を作成します。
例として、閲覧と既存ジョブが実行可能なoperator権限を作成します。
作成したユーザーと権限を紐付けます。
# $HOMEを確認する
echo "HOME: ${HOME}"
# current directoryを確認する
work_dir=`pwd`
echo "work_dir: ${work_dir}"
# process idを確認する
echo "pid of this job : $$"
pid_of_this_job="$$"
# 指定したprocess idのprocessの情報を確認する
ps auxcf | grep -i --color -e "^USER\|${pid_of_this_job}"
実行結果 USERは jenkins だ。$HOMEは /var/lib/jenkins だ。
ビルドします。 ワークスペース: /var/lib/jenkins/workspace/confirm_processes [confirm_processes] $ /bin/sh -xe /tmp/hudson1474396497236908427.sh + echo HOME: /var/lib/jenkins HOME: /var/lib/jenkins + pwd + work_dir=/var/lib/jenkins/workspace/confirm_processes + echo work_dir: /var/lib/jenkins/workspace/confirm_processes work_dir: /var/lib/jenkins/workspace/confirm_processes + echo pid of this job : 2750 pid of this job : 2750 + pid_of_this_job=2750 + ps auxcf + grep -i --color -e ^USER\|2750 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND jenkins 2750 0.0 0.0 4508 708 ? S 11:16 0:00 \_ sh Started calculate disk usage of build Finished Calculation of disk usage of build in 0 seconds Started calculate disk usage of workspace Finished Calculation of disk usage of workspace in 0 seconds Notifying upstream projects of job completion Finished: SUCCESS
$ sudo visudo
下記を追記する
jenkins ALL=NOPASSWD: ALL
編集後
1 # 2 # This file MUST be edited with the 'visudo' command as root. 3 # 4 # Please consider adding local content in /etc/sudoers.d/ instead of 5 # directly modifying this file. 6 # 7 # See the man page for details on how to write a sudoers file. 8 # 9 Defaults env_reset 10 Defaults mail_badpass 11 Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" 12 13 # Host alias specification 14 15 # User alias specification 16 17 # Cmnd alias specification 18 19 # User privilege specification 20 root ALL=(ALL:ALL) ALL 21 jenkins ALL=NOPASSWD: ALL 22 # Members of the admin group may gain root privileges 23 %admin ALL=(ALL) ALL 24 25 # Allow members of group sudo to execute any command 26 %sudo ALL=(ALL:ALL) ALL 27 28 # See sudoers(5) for more information on "#include" directives: 29 30 #includedir /etc/sudoers.d
| Jenkins URL | http://<jenkins_host>:<port>/jenkins/ |
$ cat /etc/hostname ubdt12045
user名: jenkins_slave_<hostname> にしよう
# adduser jenkins_slave_ubdt12045
# gpasswd -a jenkins_slave_ubdt12045 sudo
# visudo
%sudo ALL=(ALL:ALL) ALL
%sudo ALL=(ALL:ALL) NOPASSWD:ALL
sudo apt-get install ssh
~$ ssh-keygen -t rsa
http://<hostname>:<port>/jenkins/computer/
ubdt12045
http://<hostname>:<port>/jenkins/computer/createItem
$ sudo su jenkins $ cd ~ ~$ pwd /var/lib/jenkins ~$ ssh jenkins_slave_ubdt12045@<slave ip address> ~$ ssh-keyscan -H <slave ip address> >> ~/.ssh/known_hosts
$ scp -P 22 ~/.ssh/id_rsa.pub jenkins_slave_ubdt12045@<slave ip address>:~/.ssh/authorized_keys
http://<jenkins_host>/jenkins/credentials/store/system/domain/_/newCredentials
| 種類 | SSHユーザー名と秘密鍵 |
| スコープ | グローバル |
| ユーザー名 | スレーブ側のユーザー名/home/jenkins_slave_ubdt12045/なら「jenkins_slave_ubdt12045」にする |
| 秘密鍵 | Jenkinsマスター上の~/.sshから |
| パスフレーズ | マスター側jenkinsで ssh-keygen でid_rsaをつくったときのパスワード。パスワード無しで作成しておく。 |
| ID | 空欄 |
| 説明 | 認証情報を区別するための説明です。認証情報はスレーブ側のユーザー名のぶんだけ別に必要 |
https://wiki.jenkins-ci.org/display/JENKINS/Disable+security
http://qiita.com/koara-local/items/79cb9c08e77ac9d94b1d
Dockerコンテナを使って自動ビルドを実行する
Jenkins のスレーブを設定する
【ぼっさんのJenkins講座】マスタースレーブを体験しよう – ノード作成編
認証情報の追加 予め作成しておく。あとでNode新規作成時に認証情報として指定する。
http://<jenkins_host>/jenkins/credentials/store/system/domain/_/newCredentials
| 種類 | SSHユーザー名と秘密鍵 |
| スコープ | グローバル |
| ユーザー名 | スレーブ側のユーザー名/home/salve/なら「slave」にする |
| 秘密鍵 | マスター側jenkinsで ssh-keygen でid_rsaをつくったときの.pubがついてないほうのファイルを指定する。それか直接テキスト指定する。 |
| パスフレーズ | マスター側jenkinsで ssh-keygen でid_rsaをつくったときのパスワード。パスワード無しで作成しておく。 |
| ID | 空欄 |
| 説明 | 認証情報を区別するための説明です。認証情報はスレーブ側のユーザー名のぶんだけ別に必要 |
Jenkins Master-Slave setup and configuration with screenshots
jenkins_slave_ubdt12045@ubdt12045:~$ ls -la .ssh/ 合計 20 drwx------ 2 jenkins_slave_ubdt12045 jenkins_slave_ubdt12045 4096 4月 2 22:34 . drwxr-xr-x 21 jenkins_slave_ubdt12045 jenkins_slave_ubdt12045 4096 6月 27 20:38 .. -rw-r--r-- 1 jenkins_slave_ubdt12045 jenkins_slave_ubdt12045 393 4月 2 22:34 authorized_keys -rw------- 1 jenkins_slave_ubdt12045 jenkins_slave_ubdt12045 1679 4月 2 22:17 id_rsa -rw-r--r-- 1 jenkins_slave_ubdt12045 jenkins_slave_ubdt12045 415 4月 2 22:17 id_rsa.pub
jenkins_slave_ubdt12045@ubdt12045:~$ cat .ssh/authorized_keys ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD64FmEq7wQtyuZsi2dMK0N9UJz54aa0Xxx4bXonuLx5iucGz8ZSqDK7kWFN6LemqPursnNWArZVH9xV1QpSQVw0ZAbNEIKefn3WehK8FlNDJR+xyMx5p0Tas5qGEqRmUn7LyyTNAPqcKyC1RELPfwUD3zNqLcT+ZWX9RBLSUGXqPS3oonzy3PlrDhKdnd90I8yMoSc8N6DyydGsUiyDMK5lM6f5yZ9/oVCRQOjVKLCynqxT9cnJBEyDz83k6s9ZAeiVVEpyFBEhEbCmN/8uRtoY3+cnraRxTkThmcKeZrXRO3Z+5eJ7TwiFboeGSbYx8K5l3DPpae8SCuXrSED+rbP jenkins@ryu jenkins_slave_ubdt12045@ubdt12045:~$
sharp@ryu:~$ sudo ls -la /var/lib/jenkins/.ssh/ 合計 24 drwx------ 2 jenkins jenkins 4096 4月 1 20:51 . drwxr-xr-x 19 jenkins jenkins 4096 6月 27 18:33 .. -rw-r--r-- 1 jenkins jenkins 392 4月 1 20:51 authorized_keys -rw------- 1 jenkins jenkins 1675 4月 1 18:22 id_rsa -rw-r--r-- 1 jenkins jenkins 393 4月 1 18:22 id_rsa.pub -rw-r--r-- 1 jenkins jenkins 1914 4月 2 22:20 known_hosts
sharp@ryu:~$ sudo cat /var/lib/jenkins/.ssh/id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD64FmEq7wQtyuZsi2dMK0N9UJz54aa0Xxx4bXonuLx5iucGz8ZSqDK7kWFN6LemqPursnNWArZVH9xV1QpSQVw0ZAbNEIKefn3WehK8FlNDJR+xyMx5p0Tas5qGEqRmUn7LyyTNAPqcKyC1RELPfwUD3zNqLcT+ZWX9RBLSUGXqPS3oonzy3PlrDhKdnd90I8yMoSc8N6DyydGsUiyDMK5lM6f5yZ9/oVCRQOjVKLCynqxT9cnJBEyDz83k6s9ZAeiVVEpyFBEhEbCmN/8uRtoY3+cnraRxTkThmcKeZrXRO3Z+5eJ7TwiFboeGSbYx8K5l3DPpae8SCuXrSED+rbP jenkins@ryu sharp@ryu:~$
sharp@ryu:~$ ssh-keyscan -H 192.168.3.13 # 192.168.3.13:22 SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.10 ①|1|IbrVQ6AGPcnZjb1bg12TQSDVqbw=|7MD0OSNXgRD5Sbsyccx9ZwHaBSU= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8OdszqQYHJjuWDmsW3CRO9udWfMF3W21x0Ci5hO4v+Ot0CWr0mi4EcChYTZZfmDGLaxh+g54V+YhIkDt4y4HjQPE3bKqWifV0v26mcGeE+WBYK3+0LAGsGTbY8GDsprSegbo/RpLZhkpXHe+cG9LH4spoJ9R0Ywat31Oum6fgBd4jnJq6GZufwng438J88GebmHcUfUlkQ84z4Whj/MxYQFxnbHgfMeO87dHU1jDYvDYohIVxYw6MCQkgsgJXnmk6WIt5JBD8opVIVovt1DWjeqfcFdNMAObi2iIcpoxOPl+7VNiexe8iR7xPnQXrLk+R4pwc1rlTD10uWbF5Ij9f # 192.168.3.13:22 SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.10 ②|1|v6AzmrzF/Xxkdv3zojMuzW83A2Y=|+fn4zmtzwOrtkKMF87MYjajmAns= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDw058kch00nuVjT6h8Ip0k0q97vf1mGMyWIZHHb+hjjlsV17Bjs5LIQxxBE+EucGnXHT96TQkRW3Fxfz5fUUtg= # 192.168.3.13:22 SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.10 sharp@ryu:~$
sudo cat /var/lib/jenkins/.ssh/known_hosts
sharp@ryu:~$ sudo cat /var/lib/jenkins/.ssh/known_hosts |1|YyORgEx2VGz7TxxHcLaG9eYiBII=|fJbJHillT/v40/rzjaz1oKYqwrs= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK80ApPuNcCciu/6M8FrCybAnmZVLZML7O7bI9leGH3CsiQzIJawro84Ql6YTC0BQTDU7du/6SOu/3+bv5gOXVM= |1|ZPV6QgFXxW8AnKJCo0La7H6nG3c=|v1Cbbk3JeYMvbriv2mHzpIC7l7o= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3Q4nIWIcCooZJrMMdJEKG8lJ2x2AV4CQyQRipZYsdQ/6uf2FKrJ2chv1lTuh4rf3TJ1m8X0rrwowrznmC1X0pwv12NJ8DRi5gKmGXZW+4jfm6jI64X36FGmKuNHpbQFI4EYRZ2brw3C7n+sEeugLTZsECsnRogaP4rS5H4chgfFZr2Yd6tjW9QByEZa3Ne0Jb/syKrww3jh663TnZqwmBGxBh3XB1JxzXwDkXpOww/vWXw8oMzLNvUayTzM8AxiD/ZZTBMd1CZiZQMb6JqoNHnKwH4NpLO1MLg7E5FoYjqWXkZWrAktoOcyiAnB0qRzc/OueErVI7JDrzSDKhhM57 |1|24/Q3eYsAEB09s+N19nDEXZpJ4M=|CkEUAZ4+npXleidFkMVVLicZxbw= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK80ApPuNcCciu/6M8FrCybAnmZVLZML7O7bI9leGH3CsiQzIJawro84Ql6YTC0BQTDU7du/6SOu/3+bv5gOXVM= |1|NhJMkyvw9mOOTu5Zrmzjuds/C4s=|fA8CTs3TLkATcUDPc77BlLkL3pw= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJkVGNw3SmxSIImXko1un7CRX8MlL7jkfoZDaMWUw2PG |1|6SsqtrKDZkQ+iKQdOdQQqdsYdcw=|fKZY6xrchYiDh5lQCHPRWi5BH10= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDw058kch00nuVjT6h8Ip0k0q97vf1mGMyWIZHHb+hjjlsV17Bjs5LIQxxBE+EucGnXHT96TQkRW3Fxfz5fUUtg= ②|1|n9Oa9YTgVosAu2rDZMwuQwFf8G0=|5nn8Mkeggp0RdR/56bb/F1n+imY= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDw058kch00nuVjT6h8Ip0k0q97vf1mGMyWIZHHb+hjjlsV17Bjs5LIQxxBE+EucGnXHT96TQkRW3Fxfz5fUUtg= ①|1|c57dMJgWXDemGyJENOwFWdTsnzY=|8bG6E8a6zZrIIe2vYeNk4rFgiHo= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8OdszqQYHJjuWDmsW3CRO9udWfMF3W21x0Ci5hO4v+Ot0CWr0mi4EcChYTZZfmDGLaxh+g54V+YhIkDt4y4HjQPE3bKqWifV0v26mcGeE+WBYK3+0LAGsGTbY8GDsprSegbo/RpLZhkpXHe+cG9LH4spoJ9R0Ywat31Oum6fgBd4jnJq6GZufwng438J88GebmHcUfUlkQ84z4Whj/MxYQFxnbHgfMeO87dHU1jDYvDYohIVxYw6MCQkgsgJXnmk6WIt5JBD8opVIVovt1DWjeqfcFdNMAObi2iIcpoxOPl+7VNiexe8iR7xPnQXrLk+R4pwc1rlTD10uWbF5Ij9f
ssh-keyscan -H 192.168.3.13 >> /var/lib/jenkins/.ssh/known_hosts
http://kazuhito-m.github.io/tech/2016/12/02/jenkins-webstart-node-invisible
| ノード名 | ubdt12045.test |
| リモートFSルート | /home/jenkins_slave |
| ラベル | ubdt12045.test |
| 起動方法 | Launch agent via Java Web Start |
設定を保存する。
Connect agent to Jenkins one of these ways: -Launch agent from browser -Run from agent command line: java -jar slave.jar -jnlpUrl http://<jenkins master hostname>:<port>/jenkins/computer/ubdt12045.test/slave-agent.jnlp -secret <文字列>
~$ cd /home/jenkins_slave ~$ wget http://<jenkins master hostname>:<port>/jenkins/jnlpJars/slave.jar
~$ java -jar slave.jar -jnlpUrl http://<jenkins master hostname>:<port>/jenkins/computer/ubdt12045.test/slave-agent.jnlp -secret <文字列> &