Closed6

クラウド開発環境「PaizaCloud」の動作確認メモ

エスパ水澤エスパ水澤

PaizaCloudは、ブラウザを開くだけでエディタ、Webサーバ、DB等の開発環境が整うクラウド開発環境。Ruby on Rails, Node.js, Django, MySQL, WordPress, Java(Tomcat), PHP(LAMP), Laravel, Goなど、主要開発環境に対応している。

https://paiza.cloud/ja/

オンラインのコーディングテストを受けることで、書類選考なしに面接・会社見学可能な求人企業が見つかるスキルアップ/転職サービスを提供しているpaizaを運営しているpaiza株式会社が運営している。

PaizaCloudの主な特徴

ブラウザを開くだけ、3秒で環境構築が完了

クラウド上に用意されたエディタ、Webサーバ、DBサーバを利用し、ブラウザを開くだけですぐに開発を進めることが可能。

OSの種類を問わない

ブラウザを開くだけなので、WindowsやMacなど、OSの種類関係なく、誰もが同じ開発環境をすばやく用意できる。

ベーシックな環境は設定済み

ベーシックな開発環境は設定済み。Linuxのシェルを使えるため、自由に開発環境を構築することも可能。

サービスの公開、運用も可能

PaizaCloudで開発したWebサービスは、ベーシックプランに移行すれば一般的なホスティングサービスと同様にそのまま公開、運用できる。

イメージ動画

https://vimeo.com/246974039

料金体系

内容 無料プラン ライトプラン ベーシックプラン
金額 無料 月額980円〜 月額1,980円〜
利用期間(同じサーバ環境を継続利用できる時間) 24時間 制限無し 制限無し
連続起動時間 ブラウザ開いている間 (最大4H) ブラウザ開いている間 (最大4H) 常時起動
サービス公開制限 公開不可 公開不可 公開可能
利用可能サーバ数 1 3 常時1+3
スペック CPU2コア,メモリ2GB,ディスク1GB CPU2コア,メモリ2GB,ディスク2GB CPU2コア,メモリ2GB,ディスク4GB

OS

Linux(Ubuntu 18.04)

開発環境

Web開発: LAMP, PHP, Ruby on Rails, JSP, Django, Node.js, Laravel, Go, Express, MEAN stack, webpack, Yeoman, etc...

言語環境: Bash, C, C#, C++, Clojure, Cobol, CoffeeScript, D, Elixir, Erlang, F#, Go, Haskell, Java, JavaScript, Kotlin, MySQL, Objective-C, Perl, PHP, Python2, Python3, R, Ruby, Rust, Scala, Scheme, Swift, VB, etc...

データベース: MySQL, PostgreSQL, MongoDB, SQLite, etc...

サーバ: Nginx, Apache, MySQL, PostgreSQL Git, Heroku, wget, MeCab, Jupyter Notebook(iPython Notebook), pandas, nltk, MySQL, etc...

ライブラリ: Pytnon: Numpy, scipy, pika, matplotlib, scipy, pandas, etc...
Ruby: rails, sinatra, sqlite3, etc... Others: imagemagick

ツール: Jupyter notebook(iPython Notebook), Git, Heroku, wget, curl, ping, traceroute, MeCab, pandas, nltk, awssdk, PHP composer, etc...

推奨動作環境

OS: Windows8.1以降、Mac OS X 10.13以降、iOS12以降、Android8以降
ブラウザ: Google Chrome最新版、Firefox最新版、Safari最新版、Microsoft Edge最新版

登録

登録は無料。メールアドレス、ユーザ名、パスワードで登録可能だが、GitHub、Facebook、Google、計3種類のソーシャルログインも利用可能。

エスパ水澤エスパ水澤

ログイン後、新規サーバ作成。開発環境の指定無しで起動。

OSの確認

~$ uname -a
Linux linuxtest 4.15.0-96-generic #97-Ubuntu SMP Wed Apr 1 03:25:46 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
エスパ水澤エスパ水澤

プロセスの確認

~$ ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.4 159208  8396 ?        Ss   05:59   0:00 /lib/systemd/systemd --system
root        82  0.0  0.3  94840  6496 ?        Ss   05:59   0:00 /lib/systemd/systemd-journald
systemd+   124  0.0  0.2  70636  5412 ?        Ss   05:59   0:00 /lib/systemd/systemd-resolved
root       128  0.0  0.2  62112  5720 ?        Ss   06:00   0:00 /lib/systemd/systemd-logind
root       130  0.0  0.8 169248 17224 ?        Ssl  06:00   0:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
syslog     132  0.0  0.2 193404  4184 ?        Ssl  06:00   0:00 /usr/sbin/rsyslogd -n
root       133  0.0  0.4 300036  8560 ?        Ssl  06:00   0:00 /usr/lib/accountsservice/accounts-daemon
root       134  0.0  0.1  30028  3296 ?        Ss   06:00   0:00 /usr/sbin/cron -f
root       136  0.0  0.5 516948 11208 ?        Ssl  06:00   0:00 /usr/lib/udisks2/udisksd
message+   139  0.0  0.2  50044  4336 ?        Ss   06:00   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root       163  0.0  0.2  72300  5888 ?        Ss   06:00   0:00 /usr/sbin/sshd -D
root       169  0.0  0.9 185952 20204 ?        Ssl  06:00   0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
root       170  0.0  0.1  14664  2384 pts/0    Ss+  06:00   0:00 /sbin/agetty -o -p -- \u --noclear --keep-baud console 115200,38400,9600 xterm
root       172  0.0  0.4 307216  8736 ?        Ssl  06:00   0:00 /usr/lib/policykit-1/polkitd --no-debug
root       190  0.0  0.1  20048  3700 ?        Ss   06:00   0:00 /bin/bash /usr/local/bin/paizacloud-agent-run-forever
root       192  0.0  0.1  20048  2136 ?        S    06:00   0:00 /bin/bash /usr/local/bin/paizacloud-agent-run-forever
root       197  0.5  2.3 903532 47292 ?        Dl   06:00   0:03 node --optimize_for_size --max_old_space_size=100 /usr/local/bin/paizacloud-agent --token=e78d6ad516d7381877e96c522
ubuntu     541  0.0  0.1  28372  3628 pts/1    Ss+  06:02   0:00 tmux -2 set -g status off ; set -g prefix M-C-b ; set -g set-titles on ; set -g default-terminal xterm-256color ; s
ubuntu     544  0.0  0.1  28548  3424 ?        Ss   06:02   0:00 tmux -2 set -g status off ; set -g prefix M-C-b ; set -g set-titles on ; set -g default-terminal xterm-256color ; s
ubuntu     545  0.0  0.2  21332  5236 pts/2    Ss   06:02   0:00 bash --login
ubuntu    1291  0.0  0.1  36076  3436 pts/2    R+   06:11   0:00 ps aux
エスパ水澤エスパ水澤

systemctl

~$ systemctl
UNIT                              LOAD   ACTIVE SUB       DESCRIPTION
-.mount                           loaded active mounted   Root Mount
bin-busybox.mount                 loaded active mounted   /bin/busybox
dev-mqueue.mount                  loaded active mounted   POSIX Message Queue File System
etc-hostname.mount                loaded active mounted   /etc/hostname
etc-hosts.mount                   loaded active mounted   /etc/hosts
etc-resolv.conf.mount             loaded active mounted   /etc/resolv.conf
proc-acpi.mount                   loaded active mounted   /proc/acpi
proc-bus.mount                    loaded active mounted   /proc/bus
proc-fs.mount                     loaded active mounted   /proc/fs
proc-irq.mount                    loaded active mounted   /proc/irq
proc-kcore.mount                  loaded active mounted   /proc/kcore
proc-keys.mount                   loaded active mounted   /proc/keys
proc-sched_debug.mount            loaded active mounted   /proc/sched_debug
proc-scsi.mount                   loaded active mounted   /proc/scsi
proc-sysrq\x2dtrigger.mount       loaded active mounted   /proc/sysrq-trigger
proc-timer_list.mount             loaded active mounted   /proc/timer_list
sys-firmware.mount                loaded active mounted   /sys/firmware
systemd-ask-password-console.path loaded active waiting   Dispatch Password Requests to Console Directory Watch
systemd-ask-password-wall.path    loaded active waiting   Forward Password Requests to Wall Directory Watch
init.scope                        loaded active running   System and Service Manager
accounts-daemon.service           loaded active running   Accounts Service
apparmor.service                  loaded active exited    AppArmor initialization
binfmt-support.service            loaded active exited    Enable support for additional executable binary formats
console-getty.service             loaded active running   Console Getty
console-setup.service             loaded active exited    Set console font and keymap
cron.service                      loaded active running   Regular background program processing daemon
dbus.service                      loaded active running   D-Bus System Message Bus
keyboard-setup.service            loaded active exited    Set the console keyboard layout
networkd-dispatcher.service       loaded active running   Dispatcher daemon for systemd-networkd
paizacloud-agent.service          loaded active running   paizacloud-agent
paizacloud-tmux-restore.service   loaded active exited    PaizaCloud tmux restore
polkit.service                    loaded active running   Authorization Manager
rsyslog.service                   loaded active running   System Logging Service
ssh.service                       loaded active running   OpenBSD Secure Shell server
sysstat.service                   loaded active exited    Resets System Activity Data Collector
systemd-journal-flush.service     loaded active exited    Flush Journal to Persistent Storage
systemd-journald.service          loaded active running   Journal Service
systemd-logind.service            loaded active running   Login Service
systemd-ready.service             loaded active exited    systemd ready
systemd-resolved.service          loaded active running   Network Name Resolution
systemd-tmpfiles-setup.service    loaded active exited    Create Volatile Files and Directories
systemd-update-utmp.service       loaded active exited    Update UTMP about System Boot/Shutdown
systemd-user-sessions.service     loaded active exited    Permit User Sessions
udisks2.service                   loaded active running   Disk Manager
ufw.service                       loaded active exited    Uncomplicated firewall
unattended-upgrades.service       loaded active running   Unattended Upgrades Shutdown
-.slice                           loaded active active    Root Slice
system-getty.slice                loaded active active    system-getty.slice
system.slice                      loaded active active    System Slice
user.slice                        loaded active active    User and Session Slice
dbus.socket                       loaded active running   D-Bus System Message Bus Socket
docker.socket                     loaded active listening Docker Socket for the API
syslog.socket                     loaded active running   Syslog Socket
systemd-initctl.socket            loaded active listening /dev/initctl Compatibility Named Pipe
systemd-journald-dev-log.socket   loaded active running   Journal Socket (/dev/log)
systemd-journald.socket           loaded active running   Journal Socket
uuidd.socket                      loaded active listening UUID daemon activation socket
basic.target                      loaded active active    Basic System
cryptsetup.target                 loaded active active    Local Encrypted Volumes
getty.target                      loaded active active    Login Prompts
graphical.target                  loaded active active    Graphical Interface
local-fs-pre.target               loaded active active    Local File Systems (Pre)
local-fs.target                   loaded active active    Local File Systems
multi-user.target                 loaded active active    Multi-User System
nss-lookup.target                 loaded active active    Host and Network Name Lookups
nss-user-lookup.target            loaded active active    User and Group Name Lookups
paths.target                      loaded active active    Paths
remote-fs.target                  loaded active active    Remote File Systems
slices.target                     loaded active active    Slices
sockets.target                    loaded active active    Sockets
swap.target                       loaded active active    Swap
sysinit.target                    loaded active active    System Initialization
timers.target                     loaded active active    Timers
motd-news.timer                   loaded active waiting   Message of the Day
phpsessionclean.timer             loaded active waiting   Clean PHP session files every 30 mins
systemd-tmpfiles-clean.timer      loaded active waiting   Daily Cleanup of Temporary Directories

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

76 loaded units listed. Pass --all to see loaded but inactive units, too.
77. To show all installed unit files use 'systemctl list-unit-files'.
エスパ水澤エスパ水澤

systemctl statusの場合

$ systemctl status
 (hostname)
    State: running
     Jobs: 0 queued
   Failed: 0 units
    Since: Wed 2020-12-02 07:29:20 UTC; 45s ago
   CGroup: /docker/80798431c119f12655e0e16932a43838f6cc890edb5653b9d0bf091ef0be3d24/sandbox
           ├─init.scope
           │ └─1 /lib/systemd/systemd --system
           └─system.slice
             ├─cron.service
             │ └─122 /usr/sbin/cron -f
             ├─polkit.service
             │ └─140 /usr/lib/policykit-1/polkitd --no-debug
             ├─networkd-dispatcher.service
             │ └─124 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
             ├─accounts-daemon.service
             │ └─123 /usr/lib/accountsservice/accounts-daemon
             ├─systemd-journald.service
             │ └─67 /lib/systemd/systemd-journald
             ├─unattended-upgrades.service
             │ └─144 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
             ├─ssh.service
             │ └─126 /usr/sbin/sshd -D
             ├─rsyslog.service
             │ └─111 /usr/sbin/rsyslogd -n
             ├─console-getty.service
             │ └─133 /sbin/agetty -o -p -- \u --noclear --keep-baud console 115200,38400,9600 xterm
             ├─paizacloud-agent.service
             │ ├─130 /bin/bash /usr/local/bin/paizacloud-agent-run-forever
             │ ├─136 /bin/bash /usr/local/bin/paizacloud-agent-run-forever
             │ ├─139 node --optimize_for_size --max_old_space_size=100 /usr/local/bin/paizacloud-agent --token=38e18c33e359
             │ ├─184 tmux -2 set -g status off ; set -g prefix M-C-b ; set -g set-titles on ; set -g default-terminal xterm
             │ ├─187 tmux -2 set -g status off ; set -g prefix M-C-b ; set -g set-titles on ; set -g default-terminal xterm
             │ ├─188 bash --login
             │ ├─337 systemctl status
             │ └─338 pager
             ├─systemd-resolved.service
             │ └─108 /lib/systemd/systemd-resolved
             ├─udisks2.service
             │ └─113 /usr/lib/udisks2/udisksd
             ├─dbus.service
             │ └─117 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-on
             └─systemd-logind.service
               └─125 /lib/systemd/systemd-logind
エスパ水澤エスパ水澤

Docker

~$ docker -v
Docker version 17.05.0-ce, build 89658be
~$ docker version
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:10:54 2017
 OS/Arch:      linux/amd64
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.29/version: dial unix /var/run/docker.sock: connect: permission denied

Dockerは導入されいてるが動かず。

~$ docker run hello-world
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.29/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
~$ sudo !!
sudo docker run hello-world
docker: error during connect: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.29/containers/create: read unix @->/var/run/docker.sock: read: connection reset by peer.
See 'docker run --help'.
~$ systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-12-01 06:21:52 UTC; 1min 31s ago
     Docs: https://docs.docker.com
  Process: 2111 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 2111 (code=exited, status=1/FAILURE)
~$ systemctl start docker
Failed to start docker.service: Interactive authentication required.
See system logs and 'systemctl status docker.service' for details.
~$ sudo !!
sudo systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
このスクラップは2020/12/18にクローズされました