@@ -39,17 +39,68 @@ $ cd config/ansible
39
39
$ ansible-playbook -i SERVER_IP, init_user.yml
40
40
```
41
41
42
- Attention! Access to the server for the root wiil be close! If you are not sure, remove rows 36-41 (Remove root SSH access) from init_user.yml
42
+ Tasks:
43
+ 1 . Check ping host
44
+ 2 . Create new group for user
45
+ 3 . Create new user with group
46
+ 4 . Ensure sudoers.d is enabled
47
+ 5 . Remove password from user
48
+ 6 . Add public keys for SSH
49
+ 7 . Remote access with SSH for root user
50
+ 8 . Remote password SSH access
51
+ 9 . Restart SSH to apply changes
52
+ 10 . Update apt-get libraries
43
53
44
54
####3 . Run playbook
45
55
This step will configure server and includes few parts:
46
56
47
- 1 . Install dependences (relating to you'r rails application)
48
- 2 . Install ruby through rbenv (may take longer)
49
- 3 . Install and configuring Postgres
50
- 4 . Install and configuring Nginx and Puma
51
- 5 . Install Node through nvm
52
- 6 . Else small configuring, some relating to DigitalOcean
57
+ * Install dependencies (relating to you'r rails application)
58
+ 1 . Check ping host
59
+ 2 . apt-get upgrade
60
+ 3 . Install dependencies from /group_vars/all.yml
61
+ * Install ruby through rbenv (may take longer)
62
+ 1 . Update rbenv repository
63
+ 2 . Add rbenv to path
64
+ 3 . Copy initialization to profile
65
+ 4 . Check if ruby-build installed
66
+ 5 . Create temporary folder
67
+ 6 . Clone ruby-build repository
68
+ 7 . Install ruby-build
69
+ 8 . Remove temporary folder
70
+ 9 . Check ruby installed
71
+ 10 . Install ruby
72
+ 11 . Set global verson ruby
73
+ 12 . Rehash rbenv
74
+ 13 . Copy germs
75
+ * Install and configuring Postgres
76
+ 1 . Check default user enabled
77
+ 2 . Copy auth type
78
+ 3 . Restart service
79
+ 4 . Create shared folder for database.yml
80
+ 5 . Copy database.yml to shared folder
81
+ 6 . Create database
82
+ 7 . Ensure user has access to database
83
+ 8 . Change privilege user
84
+ * Install and configuring Nginx and Puma
85
+ 1 . Check enabled config
86
+ 2 . Create folder
87
+ 3 . Copy config file
88
+ 4 . Restart Nginx
89
+ * Install Node through nvm
90
+ 1 . Install dependencies
91
+ 2 . Install nvm
92
+ 3 . Source nvm in ~ /.profile
93
+ 4 . Install Node
94
+ 5 . Check default Node version
95
+ 6 . Set default Node version
96
+ * Else small configuring, some relating to DigitalOcean
97
+ 1 . Copy secrets.yml for Rails
98
+ 2 . set CHMOd for rbenv
99
+ 3 . Install bundler
100
+ 4 . Run rbenv Rehash
101
+ 5 . Install locales package (for DigitalOcean)
102
+ 6 . Ensure locale exists (for DigitalOcean)
103
+ 7 . Add locale to environment (for DigitalOcean)
53
104
54
105
Command:
55
106
0 commit comments