TIS株式会社で行った社内勉強会(西新宿Tech-Circle)の資料です。 Test-Kitchenを使ってTDDを実践する方法をご紹介しています。 資料内で出てくるGitLabやJenkinsのLT資料は以下リンクより見れます。 http://www.slideshare.net/yoshimitominaga/ss-36972336
やれ仮想化だ、やれクラウドだと、様々な単語が流行っていく中で、管理者が構築・運用しなければいけないサーバの数はどんどん増えています。今回はUbuntu Serverを「スケール」させるうえでとても便利なデプロイツールである「Juju」を紹介します。 Jujuとは 「Juju」はCanonicalが開発している「サービスオーケストレーションツール」です。公式サイトやホワイトペーパーでは抽象的な表現が多すぎて「お前は何を言っているんだ」状態なJujuですが、簡単に言うと「Amazon EC2やOpenStack、Azure、LXC、MAASといったサービス上にUbuntu Serverを用意し、そこに既存の各種サービスをデプロイするための自動化ツール」です。 Ubuntuにはもともと強力なパッケージ管理システムであるAPTが存在します。APTシステムを使えば多種多様なソフトウェアの依存関係の解
今年の6月にChef Soloは役割を終え、今後引退への道をたどると言うアナウンスがChefの公式ブログでありました。Chef Soloがなくなるということは、必ずChef Serverが必要になると言うことでしょうか?答えはなんとYesです。 しかし安心してください。そのためにChef Zeroが用意されています。一言で言うと、Chef Zeroはローカルで動かせるChef Serverです。 そしてChef Clientをローカルモードで動かすことでローカルのChef Zeroに接続するため、別のChef Serverは必要ありません。要するにChef Soloと同じような感覚でChefを使い続けることができます。 更にKnife-Zeroを使うとChef Solo同様にセットアップ先のマシンにChef Clientを簡単に入れることができます。そこで今回はこのKnife-Zeroを使
こんにちは。PR TIMESエンジニアの落合です。 前回の記事(Chefを使ってサーバー構築運用! PR TIMES導入編! - BREAK TIMES)で、 Chefの簡単な概要と、導入方法を簡単に解説させていただきました。 今回は、具体的なChefの活用法と構築方法をご紹介させていただければと思います。 PR TIMESにおけるChefの活用について 現在PR TIMESでは、開発環境、ステージング環境、プレビュー環境、本番環境が存在しています。 それぞれ、開発環境・ステージング環境には、WEBとDBが入っており、プレビューと本番環境では、 WEBとDBで別のサーバーを使用しています。 これらを上記の図のように、Windows上の作業マシンからknife-soloを実行して、 本番への適応を行えるような仕組みの構築を進めています。 それでは、実際にどのように、構築を進めているかをご紹介
Vagrant is an amazing tool for managing virtual machines via a simple to use command line interface. With a simple vagrant up you can be working in a clean environment based on a standard template. These standard templates are called base boxes, and this website is simply a list of boxes people have been nice enough to make publicly available. Suggest a Box Do you know of another base box? Send a
はじめに 本ブログでは、Chefおよび、Vagrantを用いた仮想インフラの構築について取り上げてきました。今回は、構築した仮想インフラの障害監視を行う監視システムの構築方法を2回に分けて解説します。第1回は、サーバー監視ツールのNagiosのインストールから、監視対象サーバの設定方法を解説します。 なお、構築に必要なソフトウエアは、Chefを用いたLAMP開発環境の構築方法~仮想環境構築編を参考にして、インストールして下さい。また、全ての構築作業は、Chefを用いて行います。 監視サーバの構築 構築する監視サーバのベースとなる仮想マシンを作成し、HTTPサーバをインストールします。 Boxの初期化 ベースとなる仮想マシン(Box)の初期化を行います。 $ mkdir -p ~/vagrant/nagios-server && cd ~/vagrant/nagios-server $ va
最近、サーバーを一から構築する必要があって、chefを使ってみることにした。 CIしたいのでまずはJenkinsを入れる。 Chef: 11.12.4 Vagrant 1.5.4 Vagrant この辺のコマンド $ vagrant box add centos http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.5-x86_64-v20140110.box $ mkdir vagrant_chef $ cd vagrant_chef $ vagrant init centos で環境構築。 Vagrantfileに config.vm.network :private_network, ip:"aaa.bbb.ccc.ddd" を追加する。 起動。 $ vagrant up sshコマンドで接続できるように $ vagra
PackerBuild and manage images as code
フロントエンドのパラダイムを参考にバックエンド開発を再考する / TypeScript による GraphQL バックエンド開発
昨日恵比寿の Engine Yard さんオフィスでの chef 勉強会 #eytokyo に行ってきました。自分の LT の資料はこちら。 https://speakerdeck.com/naoya/vagrant-plus-chef 先日書いた Vagrant と chef についてのイントロダクションです。(また Speaker Deck の script タグが貼れなくなってるぞー > ダイアリー中の人) 感想など 勉強会全体としては chef 入門にはじまり、中の人っぽい方々からの発表があったり、AWS OpsWorks の話があったりとでいいかんじでした。id:rx7 におかれましては、AWS の中の人が OpsWorks のプレゼンをすると知らず、オオトリなのに同じ内容の LT をかますという事故がありましたが 2回聞けばより記憶に残りやすいということで・・・w PaaS ベ
今年3月に入門Chef Soloを書いた時点では、Chef Solo は Environments の機能をサポートしてなかったため解説は省略しました。 その後、Chef はバージョン 11.6.0 (現在は 11.8.2) で Chef Solo での Environments をサポートし、入門Chef Solo で推薦している knife-solo も 10月末にリリースされた 0.4.0 から Environments をサポートしました。というわけで、現状 Chef と knife-solo が最新版であれば Environments を利用することができます。 たまたま今手をつけている仕事で Environments のことを調べたので備忘録的に記しておきます。 Environments とは Chef の Environments は、例えば development や pr
開発環境は難しい 最適な開発環境をつくるのっていつも難しいなーと思います。サーバ側に入って開発する人もいれば、クライアント側のIDEあげてる人もいるわけで人それぞれです。 その人に特化した開発環境をつくるだけであればそこまで難しい話ではありませんが、チームでの開発となるとそのあたりをうまく解消するのがだんだん難しくなってきます。また、新しくサブドメインが増えたりなど開発環境も常にアップデートし続ける必要があります。 このあたりを、サーバエンジニアが手動でやってると死にます。悪しきDev/Opsの対立関係がうまれてしまうので、なんとかしないといけない。 というわけで、オフィス移転をきっかけに開発環境を作りなおしてみました。以下の3点からさくらVPSを選びました。 コストを抑えたい 最近さくらVPSに東京リージョンができた ローカルネットワーク接続できるようになった 新規開発環境をつくる上での
先日 Las Vegas で開催された AWS re:Invent 2013 に参加してきました。 非常に活気あふれる大規模なカンファレンスで、大変刺激を受けました。 今日は、いま何かと話題になっている Immutable Infrastructure に関連した発表を2つ紹介します。 Stop Worrying about Prodweb001 and Start Loving i-98fb9856 slideshare: Stop Worrying about Prodweb001 and Start Loving i-98fb9856 (ARC201) | AWS re:Invent 2013 AWS の Chris Munns 氏による発表です。タイトルからして面白いですね。エモいです。 この発表は以前から目をつけていたんですが、スケジュールの都合で出られず、残念でした。こうしてス
PHPカンファレンス2013で「PHPアプリケーションの継続的アップデート」というタイトルで話をしてきました。僕は、いまでこそPerlやRubyの人みたいな感じですが、もともとはPHPからプログラミングを始めたので、PHPカンファレンスで話すというのは、感慨深いものでした。「ぺちぺ」「ぺちぱー」という言葉の創始者でもありますし。 トークの内容は、最近仕事でやってきたことのまとめみたいな感じです。PHPといいながら、2/3ぐらいはPHPには直接関係ないことばかりでしたが。トーク中でもいったように、言語そのものというよりは、システムの複雑性をいかに減らすかが「継続的な」取り組みには必要なので、いたしかたありません。それなりに面白いものになっていると思います。 スライドは以下。 これまで『WEB+DB PRESS Vol.75』『入門Puppet - Automate Your Infrastr
最近PrePAN uses carton 1.0 now! - $shibayu36->blog;でも書いたとおり、PrePANのcarton 1.0化を進めていました。 通常であれば変更点をアプリケーションサーバにデプロイし、サーバを再起動すれば良いのですが、cartonを0.9から1.0に上げるというまあまあ大きな変更を加えるため、事前に動作確認を行い、無停止でデプロイしたいと考えました。そこでAWSを使って無停止デプロイを試してみたのでそれについて書こうと思います。 PrePANのサーバ構成やデプロイ手順の検討 無停止デプロイの説明の前にPrePANのサーバ構成を紹介しておきます。 現状はELB 1つに対し、EC2が2台ぶら下がっているという状態で運用しています。そしてEC2に対してはそれぞれapp-1, app-2という名前でタグがついています。 開発メモ#2 : AWS でのホス
Chef使おうとしてるけどChefいろいろつらい. 具体的には以下がつらい. 独自概念多い chefのクライアントを対象ホストに入れなければならない knifeとか覚えないといけない外部ツールがある 最初からディレクトリ構成がわいわい (rails newしたときのあのきもち) 公式ドキュメントの量が多いかつわかりにくい 以前にmiyagawaさんのpodcast を聞いてたらnaoyaさんがAnsibleっていうシンプルなプロヴィショニングツールがあるっていう話をされていたので,使ってみた. AnsibleWorks | Radically simple IT orchestration Ansible 触ってて感じるイメージは,ChefがRailsでAnsibleがSinatraな感じ. ディレクトリ構成がない (一応大規模運用を考えたディレクトリ構成のベストプラクティス Best P
DevOpsというキーワードに関連して、「Chef」というツールの名前を聞いたことのある人も多いのではないでしょうか。この記事では、インフラにおける構成管理、展開作業を自動化するChefの構造および基本的な使い方について解説します。 インフラストラクチャ自動化フレームワーク「Chef」 Chefは、物理、仮想、クラウドといったさまざまな大きさのインフラに対して、サーバやアプリケーションの展開を容易にするための自動化フレームワークです。 Chefの重要な要素の1つに「Infrastructure as Code」という概念があります。インフラをどのように構築し、維持するべきかという定義はRubyの文法で記述され、ソースコードのように扱うことができます。つまり、あたかもRubyでプログラミングをするように、インフラの構成管理をコードによって行えることがChefの利点の1つです。 自然言語による
昨晩 Jenkins と Vagrant で CI だ、と書いたら という反応があった。確かに、可能なら物理サーバに依存しない形でテストできるとより嬉しい場面もありそうですね。 しかしそこは Vagrant。Vagrant はバージョン 1.1 から、バックエンドを VirtualBox だけでなく AWS (EC2) などの IaaS を指定して仮想サーバーを作ったり壊したりできるようになっています。詳しくは http://d.hatena.ne.jp/naoya/20130315/1363340698 この辺を。この機能を利用すれば昨日の Jenkins + Vagrant のフローをほとんど変えずに、EC2 のインスタンスでのインテグレーションテストができそうですね。 速見もこみち「では、早速やっていきましょう。」 Multi VM でローカル/リモート両対応に せっかくなので Vi
Gisted のドッグフードをかねて InfoQ のインタビューやプレゼンを見るようになった。 いくつか面白かったのを紹介したい・・・とおもってるうちにバックログを溜めすぎた。一度に紹介するのは諦めて何度かにわけよう。 今日はおっさん、具体的には ThoughtWorks 周辺の面々を追いかけてみます。InfoQ 中心だけどそれ以外も若干あり。 When Geek Leaks “プロダクティブ・プログラマ ” の著者 Neal Ford が あるキーノートにつけたタイトルは ”When Geek Leaks“。 ここでの Leak は前向きだ。Geek の情熱がその主たる関心の外にも影響を与えていくといいですね、という話。 ファインマンが物理学という専門以外で発揮した数々のいたずら心、 ”Now Every Company Is A Software Company” という Forbes
タイトルは釣りです。11個もやり方をしらないまま書き始めます。 最近 chef が流行っていますが、みなさんどうやって各サーバに chef をインストールしていますか? ここでは僕がいままで紆余曲折していた方法を紹介します。 列挙だけするとこんな感じです。 vagrant の VM イメージに入っているもの omnibus installer を使う knife solo を使う OS の ruby 環境に chef を入れる RVM 環境を作って chef を入れる rbenv 環境を作って chef を入れる roundsman を使って chef を入れる vagrant の VM イメージに入っているもの vagrant の VM イメージには、大抵 ruby と chef がインストールされています。 veewee を使ってあたらしい VM イメージを作成すると必ずインストールさ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く