ページ

2015年5月23日土曜日

GitLab環境作成 - Vagrant上に作成 -

GitHubのプライベート版?としか認識がないGitLabをVagrantのVM上に構築してみる。

早速以下のサイトを発見!!
http://qiita.com/ogomr/items/6491a268bfc95d0a5be4

GitLabのCookbookで一気に作成か!?・・と思いきや色々つまずいて
余計時間がかかってしまった><;

==> default: Running chef-solo...
==> default: stdin: is not a tty
==> default: [2015-05-23T09:49:11+00:00] INFO: Forking chef instance to converge...
==> default: [2015-05-23T09:49:11+00:00] INFO: *** Chef 12.3.0 ***
==> default: [2015-05-23T09:49:11+00:00] INFO: Chef-client pid: 1431
==> default: [2015-05-23T09:49:12+00:00] INFO: Setting the run_list to ["postfix", "gitlab::initial", "gitlab::install"] from CLI options
==> default: [2015-05-23T09:49:12+00:00] INFO: Run List is [recipe[postfix], recipe[gitlab::initial], recipe[gitlab::install]]
==> default: [2015-05-23T09:49:12+00:00] INFO: Run List expands to [postfix, gitlab::initial, gitlab::install]
==> default: [2015-05-23T09:49:12+00:00] INFO: Starting Chef Run for gitlab-berkshelf
==> default: [2015-05-23T09:49:12+00:00] INFO: Running start handlers
==> default: [2015-05-23T09:49:12+00:00] INFO: Start handlers complete.
==> default: 
==> default: ================================================================================
==> default: Recipe Compile Error in /tmp/vagrant-chef/81139a089f5602632886ffbafc8e6286/cookbooks/gitlab/recipes/initial.rb
==> default: ================================================================================
==> default: 
==> default: 
==> default: NoMethodError
==> default: -------------
==> default: undefined method `each' for nil:NilClass
==> default: 
==> default: 
==> default: Cookbook Trace:
==> default: ---------------
==> default:   /tmp/vagrant-chef/81139a089f5602632886ffbafc8e6286/cookbooks/redisio/recipes/enable.rb:23:in `from_file'
==> default: 
==> default:   /tmp/vagrant-chef/81139a089f5602632886ffbafc8e6286/cookbooks/gitlab/recipes/initial.rb:22:in `from_file'
==> default: 
==> default: 
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef/81139a089f5602632886ffbafc8e6286/cookbooks/redisio/recipes/enable.rb:
==> default: 
==> default:  16:  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
==> default:  17:  # See the License for the specific language governing permissions and
==> default:  18:  # limitations under the License.
==> default:  19:  #
==> default:  20:  
==> default:  21:  redis = node['redisio']
==> default:  22:  
==> default:  23>> redis['servers'].each do |current_server|
==> default:  24:    server_name = current_server["name"] || current_server["port"]
==> default:  25:    resource = resources("service[redis#{server_name}]")
==> default:  26:    resource.action Array(resource.action)
==> default:  27:    resource.action << :start
==> default:  28:    resource.action << :enable
==> default:  29:  end
==> default:  30:  
==> default: 
==> default: [2015-05-23T09:49:14+00:00] ERROR: Running exception handlers
==> default: [2015-05-23T09:49:14+00:00] ERROR: Exception handlers complete
==> default: [2015-05-23T09:49:14+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-05-23T09:49:14+00:00] ERROR: undefined method `each' for nil:NilClass
==> default: [2015-05-23T09:49:14+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

node[‘redisio’]がnilを返すとこくらいは分かったが逆に時間がかかりそう・・・

しょうがないので以下サイトを参考にちまちま構築
http://qiita.com/morozumi_h/items/b73eb9e2a7912dac4182

あっさり作成できましたorz



















次にじっくり使ってみよ。

0 件のコメント:

コメントを投稿