クラウドインフラ構築記

現在AWSの構築支援に携わっております。今注視しているのは、GKE、BigQuery、Google Dataflowなどサービスを展開しているGoolge Cloud Platformです。

Cloud Source Repositoryを使用してみました。 #gcpja


Google Cloud Platformには、git リポジトリ、Cloud Source Repositoryが提供されています。現在ベータといことで、無料で使うことが可能。(500MBのサイズ制限は有り)

ローカル環境に、Chef、knife-soloの環境を構築

curl -L https://www.opscode.com/chef/install.sh | 
/opt/chef/embedded/bin/gem install knife-solo --no-ri --no-rdoc
knife solo init knife-solo
cd knife-solo

Chefのリポジトリでgit local repositoryとして初期化

git init 

すべてのファイルをgitの管理下に

git add -A
git commit -m 'first commit'

Generate and store your Git credentials

screencapture-console-developers-google-com-project-skillful-fx-531-clouddev-source-repo-1436674845613

生成されたものを、.netrcに貼り付ける。

git config credential.helper gcloud.cmd

gitのリモートレポジトリとしてgoogleの下記URLを登録

git remote add google https://source.developers.google.com/p/your-project-id/

Cloud repositoryにアップロード

git push --all google

Developer Consoleから下記のように確認できるようになります。

screencapture-console-developers-google-com-project-skillful-fx-531-clouddev-source-browse-vDFBdy1OoJh-master-1436673896028

 

プライベートリポジトリとして使うことができます。プライベートリポジトリx1しか作成できないようです。

コメントは受け付けていません。