続いてホスティングに関係する話です。
サーバの構成
ジェネレータに続いてサーバ周りのお話。
なるべく既存サービスに依存せず独立した仕組みを作ろうと思い、サーバも自前で立てることに。1 今回もレンタルサーバを使いました。さくらのVPSです。 思いっきりさくらに依存してるやんと突っ込まれそうですが、 いつでも別サーバにまるっと移行出来るよう一応考えています。
プランは一旦最小構成で整えてみました。
さくらのVPS https://vps.sakura.ad.jp/
- CPU 仮想1コア
- SSD 20GB
- メモリ 512MB
- 685円/月
スマホやRaspberry Piですらギガ単位のメモリ積んでる時代ですけどね・・・ Xeonプロセッサだし、まあ、まあ。
1% cat /proc/cpuinfo 2processor : 0 3vendor_id : GenuineIntel 4cpu family : 6 5model : 62 6model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz 7stepping : 4 8microcode : 0x1 9cpu MHz : 2600.002 10cache size : 20480 KB 11physical id : 0 12siblings : 1 13core id : 0 14cpu cores : 1 15apicid : 0 16initial apicid : 0 17fpu : yes 18fpu_exception : yes 19cpuid level : 13 20wp : yes 21flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl eagerfpu pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm xsaveopt vnmi ept fsgsbase tsc_adjust smep erms 22bogomips : 5200.00 23clflush size : 64 24cache_alignment : 64 25address sizes : 40 bits physical, 48 bits virtual 26power management: 27 28processor : 1 29vendor_id : GenuineIntel 30cpu family : 6 31model : 62 32model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz 33stepping : 4 34microcode : 0x1 35cpu MHz : 2600.002 36cache size : 20480 KB 37physical id : 1 38siblings : 1 39core id : 0 40cpu cores : 1 41apicid : 1 42initial apicid : 1 43fpu : yes 44fpu_exception : yes 45cpuid level : 13 46wp : yes 47flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl eagerfpu pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm xsaveopt vnmi ept fsgsbase tsc_adjust smep erms 48bogomips : 5200.00 49clflush size : 64 50cache_alignment : 64 51address sizes : 40 bits physical, 48 bits virtual 52power management:
スペックが物足りなければ、 もちろんインスタンスタイプを上げるなり、他に移るなり出来るのですが、 逆にこのインスタンスでどこまで出来るかがこのサイトの目指す所でもあります。
NginxとGitLab CI

前述のとおり静的サイトジェネレータ Jekyll のおかげでサイト全体をGitで管理出来ているので、
セルフホスティングのGitLabにプッシュし、GitLab CIでJekyllを動かすようにしています。
GitLabはやはりGitのリポジトリとCIが一元管理出来るところが扱いやすいです。
Webサーバとしては静的サイトなのでフロントにNginxを置いているだけです。
シンプルです。非常にシンプルです。
Webはこれくらいシンプルにあるべきだと思います。
阿部 寛のホームページ 並のレスポンスを目指していきたいです。
-
たださくらのオブジェクトストレージも興味あるのでしれっと移すかも ↩