プログラムの基本的な概念を理解している人用です。変数とかループ、分岐みたいな解説は含みません。
- 開発環境の構築
- Xcode
# 概要 | |
* トータル4時間。 | |
* 完成形はgithubで公開 | |
* 手順は[stypi_](https://code.stypi.com/kaz29/php_ci_book_handson/code)でリアルタイムに共有 | |
* boxファイルはUSBで配布 | |
* 事前にVagrant/VirtualBoxのインストールまではすませおいてもらう | |
* 念のためUSBには、Win/Macのインストーラを入れておく | |
# メニュー |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
if Vagrant.has_plugin?("vagrant-cachier") | |
config.cache.scope = :box | |
end |
CakePHPで学ぶ継続的インテグレーションhttp://www.amazon.co.jp/dp/4844336789/を題材に、継続的インテグレーションの概要〜環境構築方法の解説〜実際の開発の流れを解説します。
参加される方は、ハンズオン当日までに以下の事前準備をお願いします。
ハンズオンの前に、以下の環境をご確認ください。ハンズオン会場にはネットワーク環境の提供はないので、当日ダウンロードなどは難しいです。
228c228 | |
< if (!preg_match('/^(https?|file):\/\/+/i', $url)) { | |
--- | |
> if (!preg_match('/^https?:\/\/\w[\w\-\.]+/i', $url)) { | |
231d230 | |
< | |
233,434c232,239 | |
< if (preg_match('/^https?:\/\/\w[\w\-\.]+/i', $url)) { | |
< $cache_lifetime = (int) $cache_lifetime; | |
< $use_cache = !empty($this->cacheDir) and $cache_lifetime > 0; |
#!/bin/sh | |
# APCをインストール | |
pecl install apc | |
cat <<_EOT_ 1>/etc/php.d/apc.ini | |
extension=apc.so | |
_EOT_ | |
service httpd restart |
#!/bin/sh | |
CAKEPHP_PAH=/usr/local/app | |
if [ ! -d $CAKEPHP_PAH ] | |
then | |
mkdir $CAKEPHP_PAH | |
fi | |
# IPアドレスを取得 | |
IPADDR=`ip addr show | grep eth0 | grep 'inet *' | awk '{print $2;}' | cut -f1 -d '/'` |
<?php | |
// メンバ変数を追加 | |
public $uses = array( | |
'NiftyCloudControllPanel.Instance', | |
'NiftyCloudControllPanel.KeyPair', | |
'NiftyCloudControllPanel.SecurityGroup', | |
); | |
/// アクションを追加 | |
public function run($id=null) |
cd /usr/local/app/cakephp/vendors/ | |
git clone git://github.com/kaz29/unofficial-niftycloud-sdk-for-php.git \ | |
NiftyCloud |
#!/bin/sh | |
# CakePHP2.0 setup script | |
# Only for CentOS 5.6 64bit Plain | |
/bin/cat <<EOF >> /etc/rc.d/rc.local | |
curl https://raw.github.com/gist/1284739/2fbed6559815413523cda708d99eb18f9926428a/cakephp2_on_nifyucloud_centos5_6.sh | sh | tee /root/_setup.log | |
/bin/sed -i.orig -e "s/curl/#curl/g" /etc/rc.d/rc.local | |
/bin/sed -i.orig -e "s/\/bin\/sed/#\/bin\/sed/g" /etc/rc.d/rc.local | |
EOF |