PHPCloud Introduction

Alexander Turiak (@Zifius), Atwix

Цілі:

  1. Створення Zend Framework 2 додатку
  2. Доступ до git репозиторія з використанням сертифікату
  3. Налаштування ssh-тунелювання для:

Налаштування доступу

Приватний ключ:

zendcloud-{containername}.pem → ~/.ssh/zendcloud-zifius.pem

Налаштування доступу

~/.ssh/config

Host phpcloud zifius.my.phpcloud.com
Hostname zifius.my.phpcloud.com
User zifius
IdentityFile ~/.ssh/zendcloud-zifius.pem

Налаштування доступу

Host phpcloud-tunnel
User zifius
Hostname zifius.my.phpcloud.com
IdentityFile ~/.ssh/zendcloud-zifius.pem
ProxyCommand corkscrew %h 21653 %h %p
RemoteForward 9000 127.0.0.1:9000
# required for MySQL remote connectivity, change the local port 13306 if needed
LocalForward 13306 zifius-db.my.phpcloud.com:3306
ExitOnForwardFailure yes

SSH-тунель

$ ssh -N phpcloud-tunnel
#######################################################################
#You have successfully connected to your container. #
#****Shell access is disabled for security reasons.**** #
#You can use this connection to establish tunnels to your container. #
#These can be used for for debugging and managing your mysql database.#
#Please see the following link for further instructions: #
#https://my.phpcloud.com/help/ssh-tunnel-overview #
# #
#######################################################################

MySQL

$ mysql -u mycontainer -h 127.0.0.1 -P 13306 -p mycontainer

QUESTIONS?

PHP Cloud Introduction