mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
Create pid directory for Sidekick during provision
This commit is contained in:
parent
2397f16640
commit
48f2d14734
12
README.md
12
README.md
@ -234,20 +234,14 @@ the host can provide but will usually be much more slower than a production envi
|
|||||||
yarn install
|
yarn install
|
||||||
```
|
```
|
||||||
|
|
||||||
7. Set a directory for Sidekick pids:
|
7. Copy the default configuration files:
|
||||||
|
|
||||||
```bash
|
|
||||||
mkdir -p tmp/pids
|
|
||||||
```
|
|
||||||
|
|
||||||
8. Copy the default configuration files:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp config/database.yml.virtual config/database.yml
|
cp config/database.yml.virtual config/database.yml
|
||||||
cp config/application.yml.default config/application.yml
|
cp config/application.yml.default config/application.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
10. Set up the databases. (Note that you should provide the desired admin credentials and that these
|
8. Set up the databases. (Note that you should provide the desired admin credentials and that these
|
||||||
specific set of commands must be used to set up the database as some raw SQL instructions are
|
specific set of commands must be used to set up the database as some raw SQL instructions are
|
||||||
included in the migrations. Password minimal length is 8 characters):
|
included in the migrations. Password minimal length is 8 characters):
|
||||||
|
|
||||||
@ -262,7 +256,7 @@ the host can provide but will usually be much more slower than a production envi
|
|||||||
RAILS_ENV=test rake db:migrate
|
RAILS_ENV=test rake db:migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
11. Start the application and visit `localhost:3000` on your browser to check that it works:
|
9. Start the application and visit `localhost:3000` on your browser to check that it works:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
foreman s -p 3000
|
foreman s -p 3000
|
||||||
|
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@ -33,7 +33,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
config.vm.provision "shell", privileged: false, run: "once",
|
config.vm.provision "shell", privileged: false, run: "once",
|
||||||
path: "provision/zsh_setup.sh"
|
path: "provision/zsh_setup.sh"
|
||||||
|
|
||||||
config.vm.provision "shell", privileged: false, run: "once",
|
config.vm.provision "shell", privileged: true, run: "once",
|
||||||
path: "provision/box_setup.zsh",
|
path: "provision/box_setup.zsh",
|
||||||
env: {
|
env: {
|
||||||
"LC_ALL" => "en_US.UTF-8",
|
"LC_ALL" => "en_US.UTF-8",
|
||||||
|
@ -164,10 +164,15 @@ system_tuning()
|
|||||||
{
|
{
|
||||||
echo "Tunning up the system"
|
echo "Tunning up the system"
|
||||||
|
|
||||||
|
# Create pids directory for Sidekick
|
||||||
|
sudo mkdir -p /vagrant/tmp/pids
|
||||||
|
|
||||||
|
# Enable overcomit memmory for Redis
|
||||||
sudo echo -e "\n## Redis tune-up" >> /etc/sysctl.conf
|
sudo echo -e "\n## Redis tune-up" >> /etc/sysctl.conf
|
||||||
sudo echo '# Allow background save on low memory conditions' >> /etc/sysctl.conf
|
sudo echo '# Allow background save on low memory conditions' >> /etc/sysctl.conf
|
||||||
sudo echo -e "vm.overcommit_memory = 1\n" >> /etc/sysctl.conf
|
sudo echo -e "vm.overcommit_memory = 1\n" >> /etc/sysctl.conf
|
||||||
|
|
||||||
|
# Enagle huge pages for Redis
|
||||||
sudo touch /etc/rc.local
|
sudo touch /etc/rc.local
|
||||||
sudo echo '## Redis tune-up' >> /etc/rc.local
|
sudo echo '## Redis tune-up' >> /etc/rc.local
|
||||||
sudo echo '# Reduce latency and memory usage' >> /etc/rc.local
|
sudo echo '# Reduce latency and memory usage' >> /etc/rc.local
|
||||||
@ -176,6 +181,7 @@ system_tuning()
|
|||||||
sudo echo -e "exit 0\n" >> /etc/rc.local
|
sudo echo -e "exit 0\n" >> /etc/rc.local
|
||||||
sudo chmod +x /etc/rc.local
|
sudo chmod +x /etc/rc.local
|
||||||
|
|
||||||
|
# Increase virtual memory areas for ElasticSearch
|
||||||
sudo echo -e "\n## ElasticSearch tune-up" >> /etc/sysctl.conf
|
sudo echo -e "\n## ElasticSearch tune-up" >> /etc/sysctl.conf
|
||||||
sudo echo '# Increase max virtual memory areas' >> /etc/sysctl.conf
|
sudo echo '# Increase max virtual memory areas' >> /etc/sysctl.conf
|
||||||
sudo echo -e "vm.max_map_count = 262144\n" >> /etc/sysctl.conf
|
sudo echo -e "vm.max_map_count = 262144\n" >> /etc/sysctl.conf
|
||||||
@ -200,7 +206,7 @@ setup() {
|
|||||||
install_yarn
|
install_yarn
|
||||||
install_rvm
|
install_rvm
|
||||||
install_ruby
|
install_ruby
|
||||||
system_tunning
|
system_tuning
|
||||||
clean_up
|
clean_up
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user