mirror of
https://github.com/plusclouds/bash-library.git
synced 2025-04-20 06:59:07 +00:00
ubuntu disk resize added & graylog 5 install fixed
This commit is contained in:
parent
37a63e3a1d
commit
7bd6bd7806
8 changed files with 93 additions and 0 deletions
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
8
.idea/bash-library.iml
generated
Normal file
8
.idea/bash-library.iml
generated
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/bash-library.iml" filepath="$PROJECT_DIR$/.idea/bash-library.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
19
.idea/php.xml
generated
Normal file
19
.idea/php.xml
generated
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MessDetectorOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCSFixerOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCodeSnifferOptionsConfiguration">
|
||||
<option name="highlightLevel" value="WARNING" />
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PhpStanOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PsalmOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
27
maintenance/disk/resize/ubuntu20.sh
Normal file
27
maintenance/disk/resize/ubuntu20.sh
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
# @copyright This script is taken from the page https://superuser.com/questions/332252/how-to-create-and-format-a-partition-using-a-bash-script
|
||||
|
||||
# This script will extend the root partition. Do not use if the volume is built with LVM
|
||||
|
||||
# Assigning out default partition as /dev/xvda3 because we are using this partition in PlusClouds
|
||||
VOL="${VARIABLE:-/dev/xvda}"
|
||||
|
||||
# to create the partitions programatically (rather than manually)
|
||||
# we're going to simulate the manual input to fdisk
|
||||
# The sed script strips off all the comments so that we can
|
||||
# document what we're doing in-line with the actual commands
|
||||
# Note that a blank line (commented as "defualt" will send a empty
|
||||
# line terminated with a newline to take the fdisk default.
|
||||
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk ${VOL}
|
||||
d # delete the partition
|
||||
3 # selecting partition 3 for this
|
||||
n # new partition
|
||||
p # primary partition
|
||||
3 # partition number 3
|
||||
# enter to select minimum block
|
||||
# enret to select the maximum block
|
||||
w # write to partition table
|
||||
q # and we're done
|
||||
EOF
|
||||
|
||||
resize2fs /dev/xvda3
|
8
setup/graylog5/readme.md
Normal file
8
setup/graylog5/readme.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Graylog 5
|
||||
This group of scripts installs graylog on to an empty machine without using containers.
|
||||
|
||||
# Logs
|
||||
|
||||
- December 24, 2023, initial deployment test made
|
||||
- December 24, 2023, [BUG] mongodb is not running
|
||||
- December 24, 2023, mongodb fix made
|
|
@ -40,6 +40,15 @@ echo "Generated hash: $HASH"
|
|||
|
||||
sed -i "s/password_secret =/password_secret = $PASSWORD/" /etc/graylog/server/server.conf
|
||||
sed -i "s/root_password_sha2 =/root_password_sha2 = $HASH/" /etc/graylog/server/server.conf
|
||||
sed -i "s/#http_bind_address = 127.0.0.1:9000/http_bind_address = 0.0.0.0:9000/" /etc/graylog/server/server.conf
|
||||
|
||||
sudo mkdir -p /var/run/mongodb
|
||||
sudo chown mongodb:mongodb /var/run/mongodb
|
||||
sudo chmod 0755 /var/run/mongodb
|
||||
sudo mkdir -p /var/lib/mongo
|
||||
sudo chown mongodb:mongodb /var/lib/mongo
|
||||
sudo chmod 0700 /var/lib/mongo
|
||||
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable graylog-server.service
|
||||
|
|
Loading…
Add table
Reference in a new issue