You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
はじめに 中山です。自己紹介ブログ以外では一発目のエントリです。よろしくお願いします。 唐突ですが、みなさんMacの環境構築はどのように行っていますか。温かみのある手作業で行っていますか。または、何らかのツールを利用して自動的に設定が行えるような仕組みで構築していますか。 私はこの作業にAnsibleを利用しています。Ansibleを利用したMacの環境構築というと、去年話題になっていましたね。こちらのエントリが火付け役だったと記憶しています。その後も、エンジニア界隈で定期的に話題になるネタのようです。 私は結構前からこの方法で環境構築を行ってきたということもあって、そこそこ知見が溜まってきました。また、時期的に(新入社員の季節!私もです)会社からPCを支給され初期構築に四苦八苦されている方々が多いのではないでしょうか。 そこで本エントリではAnsibleを利用したMacの環境構築2016
概要 t-wada.hatenablog.jp Ansibleでmacの環境構築する際、id:t-wada さんの上記の記事を参考したのですが、 Ansible Best Practicesに沿っていなかったので、書き直してみました。 Ansibleを動かすまで こちらは、t_wadaさんの記事のままです。 sudo xcodebuild -license xcode-select --install ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew doctor brew update brew install python brew install ansible どこを直したのか twada/macbook-provisioning hoshin
Ansible getting started Getting started with Ansible Getting started with Execution Environments Installation, Upgrade & Configuration Installation Guide Ansible Porting Guides Using Ansible Building Ansible inventories Using Ansible command line tools Using Ansible playbooks Ansible playbooks Working with playbooks Templating (Jinja2) Using filters to manipulate data Tests Lookups Python3 in temp
I had a requirement today where I needed to install node.js from source in a custom location (/opt/node) on an ubuntu host. Compiling it from source on the target hosts (though not the ideal way to go about things), wasn't a problem at all - and everything went smoothly. Unfortunately, turns out that the global npm packages installed from this custom location like to use #!/usr/bin/env node as the
Ansibleのディレクトリ構成を決める際、プロダクション環境、ステージング環境、開発環境といった環境ごとに異なる設定を変更する方法でしっくり来るものを思いつかず、どうしたものかと悩んでいたのですが、今日見つけたブログ記事でそれもスッキリ解消したのでメモっておきます。 結論 まず結論を。プロダクション環境、ステージング環境、開発環境といった環境ごとに異なる設定する場合は、以下のように対応するのが良さそうです。 ディレクトリ構成は、公式ドキュメントに従う。 Best Practices — Ansible Documentation プロダクション、ステージング、開発など、ステージごとの変数切替は以下のブログを参考に、"group_vars"を利用して行う。 インベントリファイルの中に、"[production:children]"のようなグループすべてが属するグループを作ってしまい、そのグ
A quick demo of Ansible and GCE http://t.co/6rqxSt41NL — Red Hat Ansible (@ansible) June 27, 2014A quick demo of Ansible and GCE http://t.co/6rqxSt41NL — Ansible (@ansible) 2014, 6月 27 という tweet を見て、Docker Meetup で GCE の $500 分クーポンをもらっていたのを思い出したので試してみました。 ブラザから操作してみるまずは、Ansible を使わないでブラウザからインスタンスを立ち上げてみます。https://console.developers.google.com/ Web Console から手動でインスタンスを立ち上げるには、プロジェクトを作成・選択し、画面左にあるメニ
今日はAnsibleでGCEを触りました。 先に参考リンクを貼っていますが、色々見ている通り結構ハマリました。 参考にしたの [公式]Google Cloud Platform Guide(英語) [公式]GCE Module [公式]Demo: Ansible and Google Compute Engine [Qiita]AnsibleでGCEインスタンスを管理する [Qiita]AnsibleでGCEロードバランシング [Speaker Deck]Google Compute Engine and Ansible(英語) 環境 OS X 10.9.4 ansible 1.7 apache-libcloud 0.15.1 やってく やったのは GCEのサーバ2台作って apache入れる です。 多分上記の参考にした記事を見えればできると思うのですがいくつかハマったのでだらだら書いて
Ansible でパスワードやAPIキーなどの機密情報を扱う場合には ansible-vault を使うことで暗号化されたファイルとして変数を保存できます。 簡単な使い方は以前書きました Ansible Vault を試す しかしながら、ansible-vault はファイル単位での暗号化であるため、暗号化の不要な項目までまるっと暗号化され、どんな変数が定義されているのかすらわからなくなってしまうという問題がありました。 これは結構不便です。 そんなことをずっと思っていたのですが、ふとドキュメントを読んでいたらこの問題の解決策が書いてありました。 Splitting Out Host and Group Specific Data なんと、バージョン 1.4 という ansible-vault 登場(1.5)以前からある機能でした!! が、 As an advanced use-case,
(翻訳): Ansibleを使ったデプロイに関する一考察¶ (訳注: この記事は Thoughts on deploying with Ansible の翻訳です。著者のRamon de la Fuente さんから許可を得て、翻訳・公開しています。元記事の公開は2014年6月ですが、2015年1月現在にも通用する話だと思います) 私たちのデプロイ手順を簡単にするために Ansible で roleを書きました(以前は Capistrano を使っていました)。このroleは今やかなり完璧で、本番環境に使い始めています。しかし作り始めた当初はいくつかの点で議論する必要がありました。今回みなさんとその議論を共有しようと考えたわけです。 デプロイとは?¶ 最初に "デプロイ" を定義しましょう。デプロイするとき、ユーザーはすでに "Provisioning" を終えており権限なども適切に整って
Ansible コーディング規約 (の例)¶ edX がgithub上でAnsibleのコーディング規約を公開しています。 https://github.com/edx/configuration/wiki/Ansible-Coding-Conventions このリポジトリは GNU AGPLv3です。翻訳の場合でもおそらく大丈夫だと思いますので、ここで翻訳して公開してみます。 一般¶ YAMLファイル すべてのyamlファイルは2スペースのインデントで、 .yml を拡張子に 付けてください。 変数 jinja変数の形式を使ってください。 $var ではなく {{ var }} です。 jinjaの変数名の前後に空白を入れてください。 {{var}} ではなく {{ var }} です。 環境独自で上書きされる必要がある変数名は全部大文字としてください。 ロール内で完結する変数名は全部
Get a free preview of Ansible Up & Running by Lorin Hochstein. Preview includes: Chapter 1 Introduction Chapter 2 Playbooks, a Beginning Chapter 3 Inventory: Describing Your Servers "Lorin has been a long-time member of the Ansible community, and I'm really happy to see this book come out for those looking for a detailed introduction and overview of all things Ansible." Michael DeHaan, Founder o
This document discusses version 2 (V2) of Ansible, which refactors portions of Ansible's core executor engine to address technical debt. Key changes in V2 include improved error messages, new block and strategy execution plugins, execution-time evaluation of included tasks, and better object-oriented design. The goal is to improve testability and make it easier to add new features without breaking
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く