ALminiumインストール作業メモ

環境

ALminium:v2.2.4-4
OS:CentOS6.5
jenkins-1.562-1.1(jenkins-1.562-1.1

手順

  • SELinuxの無効化
  • # vi /etc/selinux/config
    SELINUX=disabledへ書き換え
    
  • iptablesの無効化
  • # service iptables status
    # service iptables stop
    # chkconfig iptables off
    
  • gitのインストール
  • # yum install git
    Loaded plugins: fastestmirror
    Determining fastest mirrors
     * base: mirror.fairway.ne.jp
     * extras: mirror.fairway.ne.jp
     * updates: mirror.fairway.ne.jp
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package git.x86_64 0:1.7.1-3.el6_4.1 will be installed
    --> Processing Dependency: perl-Git = 1.7.1-3.el6_4.1 for package: git-1.7.1-3.el6_4.1.x86_64
    --> Processing Dependency: perl >= 5.006 for package: git-1.7.1-3.el6_4.1.x86_64
    --> Processing Dependency: rsync for package: git-1.7.1-3.el6_4.1.x86_64
    --> Processing Dependency: perl(warnings) for package: git-1.7.1-3.el6_4.1.x86_64
    --> Processing Dependency: perl(vars) for package: git-1.7.1-3.el6_4.1.x86_64
    --> Processing Dependency: perl(strict) for package: git-1.7.1-3.el6_4.1.x86_64
    --> Processing Dependency: perl(lib) for package: git-1.7.1-3.el6_4.1.x86_64
    --> Processing Dependency: perl(Git) for package: git-1.7.1-3.el6_4.1.x86_64
    --> Processing Dependency: perl(Getopt::Long) for package: git-1.7.1-3.el6_4.1.x86_64
    --> Processing Dependency: perl(File::Spec) for package: git-1.7.1-3.el6_4.1.x86_64
    --> Processing Dependency: perl(File::Find) for package: git-1.7.1-3.el6_4.1.x86_64
    --> Processing Dependency: perl(File::Basename) for package: git-1.7.1-3.el6_4.1.x86_64
    --> Processing Dependency: perl(Exporter) for package: git-1.7.1-3.el6_4.1.x86_64
    --> Processing Dependency: perl(Error) for package: git-1.7.1-3.el6_4.1.x86_64
    --> Processing Dependency: perl(Cwd) for package: git-1.7.1-3.el6_4.1.x86_64
    --> Processing Dependency: /usr/bin/perl for package: git-1.7.1-3.el6_4.1.x86_64
    --> Running transaction check
    ---> Package perl.x86_64 4:5.10.1-136.el6 will be installed
    --> Processing Dependency: perl-libs = 4:5.10.1-136.el6 for package: 4:perl-5.10.1-136.el6.x86_64
    --> Processing Dependency: perl-libs for package: 4:perl-5.10.1-136.el6.x86_64
    --> Processing Dependency: perl(version) for package: 4:perl-5.10.1-136.el6.x86_64
    --> Processing Dependency: perl(Pod::Simple) for package: 4:perl-5.10.1-136.el6.x86_64
    --> Processing Dependency: perl(Module::Pluggable) for package: 4:perl-5.10.1-136.el6.x86_64
    --> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.10.1-136.el6.x86_64
    ---> Package perl-Error.noarch 1:0.17015-4.el6 will be installed
    ---> Package perl-Git.noarch 0:1.7.1-3.el6_4.1 will be installed
    ---> Package rsync.x86_64 0:3.0.6-9.el6_4.1 will be installed
    --> Running transaction check
    ---> Package perl-Module-Pluggable.x86_64 1:3.90-136.el6 will be installed
    ---> Package perl-Pod-Simple.x86_64 1:3.13-136.el6 will be installed
    --> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.13-136.el6.x86_64
    ---> Package perl-libs.x86_64 4:5.10.1-136.el6 will be installed
    ---> Package perl-version.x86_64 3:0.77-136.el6 will be installed
    --> Running transaction check
    ---> Package perl-Pod-Escapes.x86_64 1:1.04-136.el6 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =============================================================================================================================================================================================================================================
     Package                                                           Arch                                               Version                                                         Repository                                        Size
    =============================================================================================================================================================================================================================================
    Installing:
     git                                                               x86_64                                             1.7.1-3.el6_4.1                                                 base                                             4.6 M
    Installing for dependencies:
     perl                                                              x86_64                                             4:5.10.1-136.el6                                                base                                              10 M
     perl-Error                                                        noarch                                             1:0.17015-4.el6                                                 base                                              29 k
     perl-Git                                                          noarch                                             1.7.1-3.el6_4.1                                                 base                                              28 k
     perl-Module-Pluggable                                             x86_64                                             1:3.90-136.el6                                                  base                                              40 k
     perl-Pod-Escapes                                                  x86_64                                             1:1.04-136.el6                                                  base                                              32 k
     perl-Pod-Simple                                                   x86_64                                             1:3.13-136.el6                                                  base                                             212 k
     perl-libs                                                         x86_64                                             4:5.10.1-136.el6                                                base                                             578 k
     perl-version                                                      x86_64                                             3:0.77-136.el6                                                  base                                              51 k
     rsync                                                             x86_64                                             3.0.6-9.el6_4.1                                                 base                                             334 k
    
    Transaction Summary
    =============================================================================================================================================================================================================================================
    Install      10 Package(s)
    
    Total download size: 16 M
    Installed size: 51 M
    Is this ok [y/N]: y
    
  • Alminiumをgithubから取得
  • # git clone https://github.com/almimnium/alminium.git
    Initialized empty Git repository in /root/alminium/.git/
    remote: Counting objects: 3174, done.ESC[K
    remote: Compressing objects:   0% (1/1433)
    
  • ALminiumのバージョンを取得
  • 最新版をチェックアウト
  • # cd alminium
    # git tag
    v0.1rhel
    v0.9.0
    v1.0.0
    v1.1.0
    v1.1.1
    v1.1.2
    v1.1.3
    v1.1.4
    v1.1.5
    v1.1.6
    v1.2.0
    v1.2.1
    v1.2.2
    v1.2.3
    v1.2.4
    v2.0.0
    v2.0.0beta1
    v2.0.0rc1
    v2.0.3
    v2.2.0
    v2.2.1
    v2.2.2
    v2.2.2-2
    v2.2.4
    v2.2.4-2
    v2.2.4-3
    v2.2.4-4
    # git checkout v2.2.4-4
    Note: checking out 'v2.2.4-4'.
    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.
    
    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:
    
      git checkout -b new_branch_name
    
    HEAD is now at 2ae5074... Merge commit 'v2.2.4-3'
    
  • ALminiumのインストール
  • # ./smelt
    ホスト名:XX.XX.XX.XX
    □SSLのサポート:y
    □メール設定:0
    □SMPTサーバー:localhost
    □暗号化:n
    □ポート番号:25
    □認証の必要:n
    □jenkins:y
    □セキュリティ:y
    
  • インストール失敗
  • 以下のエラーで無限ループ
  • パッケージインストールの準備中...
    mod_auth_mysql-3.0.0-11.el6.1.redmine
    Initialized empty Git repository in /var/lib/jenkins/persona/.git/
    remote: Reusing existing pack: 8, done.
    remote: Total 8 (delta 0), reused 0 (delta 0)
    Unpacking objects: 100% (8/8), done.
    sed: /etc/sysconfig/jenkinsを読み込めません: そのようなファイルやディレクトリはありません
    chown: ユーザ指定が不正: `jenkins.jenkins'
    jenkins: 認識されていないサービスです。
    --2014-05-12 17:30:08--  http://localhost:8080/jenkins/jnlpJars/jenkins-cli.jar
    localhost をDNSに問いあわせています... ::1, 127.0.0.1
    localhost|::1|:8080 に接続しています... 失敗しました: 接続を拒否されました.
    localhost|127.0.0.1|:8080 に接続しています... 失敗しました: 接続を拒否されました.
    

    ※jenkinsのインストールに失敗していた模様。

    curl: (22) The requested URL returned error: 502 Bad Gateway
    エラー: http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key: インポート読み込みに失敗しました(2)。
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirror.fairway.ne.jp
     * epel: ftp.jaist.ac.jp
     * extras: mirror.fairway.ne.jp
     * updates: mirror.fairway.ne.jp
    http://pkg.jenkins-ci.org/redhat/repodata/repomd.xml: [Errno 12] Timeout on http://pkg.jenkins-ci.org/redhat/repodata/repomd.xml: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds')
    Trying other mirror.
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: jenkins. Please verify its path and try again
    
  • ミラーサイトからjenkinsのrpmをwget
  • 手動でインストール
  • # wget -O /root/jenkins-1.562-1.1.noarch.rpm http://ftp.osuosl.org/pub/jenkins/redhat/jenkins-1.562-1.1.noarch.rpm
    --2014-05-12 18:40:26--  http://ftp.osuosl.org/pub/jenkins/redhat/jenkins-1.562-1.1.noarch.rpm
    ftp.osuosl.org をDNSに問いあわせています... 140.211.166.134
    ftp.osuosl.org|140.211.166.134|:80 に接続しています... 接続しました。
    HTTP による接続要求を送信しました、応答を待っています... 200 OK
    長さ: 62083190 (59M) [application/x-rpm]
    `/root/jenkins-1.562-1.1.noarch.rpm' に保存中
    # rpm -ivh jenkins-1.562-1.1.noarch.rpm
    警告: jenkins-1.562-1.1.noarch.rpm: ヘッダ V4 DSA/SHA1 Signature, key ID d50582e6: NOKEY
    準備中...                ########################################### [100%]
       1:jenkins                警告: /etc/yum.repos.d/jenkins.repo は /etc/yum.repos.d/jenkins.repo.rpmnew として作成
    されました。
    ########################################### [100%]
    # rpm -q ESC[ESC[Ka | grep jenkins
    jenkins-1.562-1.1.noarch
    
    • ALminium再インストール
    • →失敗
    # cd /root/ALminium
    # ./smelt
    
    [省略]
    
    --2014-05-12 18:51:06--  http://localhost:8080/jenkins/jnlpJars/jenkins-cli.jar
    localhost をDNSに問いあわせています... ::1, 127.0.0.1
    localhost|::1|:8080 に接続しています... 接続しました。
    HTTP による接続要求を送信しました、応答を待っています... 503 Service Unavailable
    2014-05-12 18:51:06 エラー 503: Service Unavailable。
    

    ※昨日の今日で、jenkins-1.563-1.1がリリースされていました。
    ただ、1.563でも事象が解決していませんでしたが。。。

    • /var/log/jenkins/jenkins.logを参照
    重大: Failed Loading global config
    java.io.IOException: Unable to read /var/lib/jenkins/config.xml
            at hudson.XmlFile.unmarshal(XmlFile.java:165)
            at jenkins.model.Jenkins$17.run(Jenkins.java:2567)
            at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
            at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
            at jenkins.model.Jenkins$7.runTask(Jenkins.java:905)
            at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
            at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            at java.lang.Thread.run(Thread.java:744)
    Caused by: com.thoughtworks.xstream.converters.ConversionException: org.jenkinsci.plugins.reverse_proxy_auth.Revers
    eProxySecurityRealm : org.jenkinsci.plugins.reverse_proxy_auth.ReverseProxySecurityRealm

    にっちもさっちも行かなくなり、このサイト[jenkinsのインストールスクリプトが完了しない #120]にたどり着く
    サイトを参考に、ALminiunの開発者向け最新版をチェックアウトしてみる

    # cd /root/ALminiun
    # git chekout dev
    # git checkout dev
    M       theme/gitmike
    Previous HEAD position was 2ae5074... Merge commit 'v2.2.4-3'
    Branch dev set up to track remote branch dev from origin.
    Switched to a new branch 'dev'
    # git pull
    Already up-to-date.
    

    とりあえず、ここまで