Adding new server
NOTE: All these steps must be done with root
privileges
- [Access key] by SSH ON LOCAL machine generate new keys for server:
ssh-keygen -t rsa -b 4096 -C "srv_oper"
- Create swap-file (http://mydebianblog.blogspot.ru/2010/05/swap-swap-linux.html)
- dd if=/dev/zero of=/swapfile bs=1M count=5000
- mkswap /swapfile
- swapon /swapfile
- echo “/swapfile none swap sw 0 0” » /etc/fstab
- install git:
apt-get update && apt-get -y install git
- [Deploy key] generate key
ssh-keygen -t rsa -b 4096 -C "your_github_email_account@example.com"
- [Deploy key] Import public park of the key into guthub (in REPO Repository->Settings->Deploy Keys, don’t forget give a meaningful name)
- [Deploy key] add into /home/deploy-user-name/.ssh/config:
Host github.com Hostname github.com user git IdentitiesOnly yes IdentityFile ~/.ssh/id_rsa.deployment
- [Deploy key]
chmod 600 ~/.ssh/config
!!! - [Deploy key]
chmod 700 ~/.ssh
- checkout
story_line2_deployment
(better in/root
dir) dir by:git clone github.com:fedor-malyshkin/story_line2_deployment.git provision
- change domain name:
- Add “hostname.nlp-project.ru” to
/etc/hostname
- Add “11.22.33.44 hostname hostname.nlp-project.ru” to
/etc/hosts
- Add “hostname.nlp-project.ru” to
- Set timezone:
sudo timedatectl set-timezone Europe/Moscow
- Make necessary configuration in provision settings according to new server
- Reboot
- Run
provision_production.sh
- [Access key]
sudo -u srv_oper bash
on REMOTE MACHINE - [Access key] add public keys to to
/home/srv_oper/.ssh/authorized_keys
on REMOTE MACHINE - [Access key] Add entries to local SSH config (
/home/XXXX/.ssh/config
):Host YYYYY Hostname 11.22.33.44 user srv_oper IdentitiesOnly yes IdentityFile ~/.ssh/rsa.YYYYYY
Table of content:
- Home
- Prerequisites
- Developement stand provisioning
- Components
- Crawler (Spring Boot, Java)
- Message Broker (Kafka)
- Distributed file storage (Hadoop’s HDFS)
- Data warehouse (Apache Hive)
- Distributed business logic cluster (Akka, Scala)
- Distributed data processing cluster (Spark, Scala)
- Indexing/Search engine (Elasticsearch)
- REST server (Lagom, Scala)
- Service coordination (Zookeeper)
- Time-series database (monitoring data) (InfluxDB)
- Metrics collector (Telegraf)
- Monitoring visualization service (Grafana)
- Reverse proxy/load-balancer (nginx)
- Monitoring Links
- Development