LTSI JTA環境の構築 その2

http://d.hatena.ne.jp/kuro496/20160405#p1 の続き

前回の最後、install.sh 実行から。

  1. networkの負荷などの問題で何かしらエラーが出るが、くじけず何度もinstall.shを実行。こんな感じ。

http://localhost:8080/jta/jnlpJars/jenkins-cli.jar:
2016-06-07 15:32:16 ERROR 503: Service Temporarily Unavailable.

Successfully built 5befb6946654
のようにでればOK.

  1. ./jta-host-scripts/docker-create-container.sh を実行。
  2. ./jta-host-scripts/docker-start-container.sh を実行し、Dockerへログインする

[....] Starting Jenkins Continuous Integration Server: jenkinssu: System error
failed!

というエラーになる。ググってもなかなか情報ない。/etc/init.d/jenkinsを編集する、という情報を入手。
編集箇所は2ヶ所。

28行目、108行目をコメントアウト。sudo実行するように置き換える。

28 #SU=/bin/su
29 SUDO=/usr/bin/sudo
<略>
108 #$SU -l $JENKINS_USER --shell=/bin/bash -c "$DAEMON $DAEMON_ARGS -- $JAVA $JAVA_ARGS -jar $JENKINS_WAR $JENKINS_ARGS" || return 2
109 $SUDO -H -u $JENKINS_USER $DAEMON $DAEMON_ARGS -- $JAVA $JAVA_ARGS -jar $JENKINS_WAR $JENKINS_ARGS || return 2

その後、$ /etc/init.d/jenkins restartを実行。もしくは再ログイン。
ブラウザから http://localhost:8080/jta にアクセス

Docker 起動

アイコン(Docker Quickstart Terminal)をクリックしてMINGW起動。
https://docs.docker.com/windows/step_one/

こんな画面が出ます。クジラ出現。
$ docker run hello-world

で、無事ログが出ればOK

$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world

4276590986f6: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:4f32210e234b4ad5cac92efacc0a3d602b02476c754f13d517e1ada048e5a8ba
Status: Downloaded newer image for hello-world:latest

Hello from Docker.
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker Hub account:
https://hub.docker.com

For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/

Docke for Windowsではまる

https://www.docker.com/products/docker-toolbox
ここからDockerのインストーラをダウンロードしてインストールした。
MSYS Gitを標準インストールするようだったのだが、すでにTortoiseGitを入れていたので(どちらもLinuxのgitと比べたら使いづらいのだが、、) チェックをハズしていた。
問題なくインストール完了したと思いきや、Docker Quickstart Terminalアイコンをクリックしても「bash.exeがありません」と言われて起動しない。

git があるから使えるハズと何度インストールしても同じ結果。
じゃあ、MSYS git有効にして再度Dockerをインストール、、、、のはずが、今度は読み書きできないなどとインストール失敗のエラーに。

うーん。
結局、Docker、TortoiseGitもアンインストールして、(さらに厳密にはHDDディスクエラーが出たのディスクチェックかけて)再度Dockerをフルインストールすることで無事起動。

LTSI 自動テスト

  1. コード取得
     git clone https://bitbucket.org/cogentembedded/jta-public.git
  2. dockerをインストール
     sudo apt-get install docker
  3. ./install.shを実行
    しようとしたらdockerがインストールされてないと言われる。なぜ!?
  4. sudo apt-get install docker.ioだった
  5. ./install.shを再度実行

ラズベリーパイのインストールメモ

https://www.raspberrypi.org/downloads/raspbian/
上記からラズビアンのイメージzipをダウンロード。最新版はRASPBIAN WHEEZY JESSIE。1200MBあって時間かかる。ので暫し待つ。

imgを解凍

解凍すると4GB。なので8G以上のSDカードを準備。

SDにimgイメージを書き込み

win32diskimagerを下記から取得。バージョンは0.9.5。
http://sourceforge.net/projects/win32diskimager/files/latest/download

http://elinux.org/RPi_Easy_SD_Card_Setup#Using_the_Win32DiskImager_program