Skip to content

Commit 0d30e80

Browse files
committed
made changes converting it from amazon to azure
1 parent 738ad53 commit 0d30e80

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

postgres_startup.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ echo "" >> /usr/local/startup.log
2121

2222
# format and partition data disk(s)
2323
# will be mounted at "/media/data(n)"
24-
#sudo chmod +x ./autopart.sh >> /usr/local/startup.log
25-
#sudo ./autopart.sh >> /usr/local/startup.log
26-
#sudo mkdir /media/data1/data
27-
#sudo chmod 777 /media/data1/data
24+
sudo chmod +x ./autopart.sh >> /usr/local/startup.log
25+
sudo ./autopart.sh >> /usr/local/startup.log
26+
sudo mkdir /media/data1/data
27+
sudo chmod 777 /media/data1/data
2828

2929
# create RAID
30-
sudo apt-get --assume-yes -qq install mdadm
31-
sudo apt-get --assume-yes -qq install xfsprogs
32-
sudo chmod +x ./ebs_raid0.sh >> /usr/local/startup.log
33-
sudo ./ebs_raid0.sh /mnt/database >> /usr/local/startup.log
34-
sudo mkdir /mnt/database/data
35-
sudo chmod 777 /mnt/database/data
30+
#sudo apt-get --assume-yes -qq install mdadm
31+
#sudo apt-get --assume-yes -qq install xfsprogs
32+
#sudo chmod +x ./ebs_raid0.sh >> /usr/local/startup.log
33+
#sudo ./ebs_raid0.sh /mnt/database >> /usr/local/startup.log
34+
#sudo mkdir /mnt/database/data
35+
#sudo chmod 777 /mnt/database/data
3636

3737
# update package lists for PostgreSQL 9.6
3838
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
@@ -160,7 +160,7 @@ if [ $myIndex -ne 0 ]
160160
fi
161161
echo " listen: '*:5433'" >> $patroniCfg
162162
echo " connect_address: 10.0.101.$(($myIndex + 10)):5433" >> $patroniCfg
163-
echo " data_dir: /mnt/database/data/postgresql" >> $patroniCfg
163+
echo " data_dir: /media/data1/data/postgresql" >> $patroniCfg
164164
echo " pgpass: /tmp/pgpass" >> $patroniCfg
165165
if [ $myIndex -ne 0 ]
166166
then

template.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
"properties": {
179179
"publisher": "Microsoft.OSTCExtensions",
180180
"type": "CustomScriptForLinux",
181-
"typeHandlerVersion": "1.2",
181+
"typeHandlerVersion": "2.0",
182182
"settings": {
183183
"fileUris": [
184184
"https://raw.githubusercontent.com/HelloTech/azure_patroni/master/zookeeper_startup.sh"
@@ -306,7 +306,7 @@
306306
"properties": {
307307
"publisher": "Microsoft.OSTCExtensions",
308308
"type": "CustomScriptForLinux",
309-
"typeHandlerVersion": "1.2",
309+
"typeHandlerVersion": "2.0",
310310
"settings": {
311311
"fileUris": [
312312
"https://raw.githubusercontent.com/HelloTech/azure_patroni/master/autopart.sh",

0 commit comments

Comments
 (0)