run config/update_files.sh
This commit is contained in:
parent
1c9c22477c
commit
de0fa9eb69
@ -60,12 +60,10 @@ autoinstall:
|
||||
- echo --- done! ---
|
||||
user-data:
|
||||
hostname: srv1c
|
||||
|
||||
groups:
|
||||
- postgres
|
||||
- grp1cv8
|
||||
- www-data
|
||||
|
||||
users:
|
||||
- default
|
||||
- name: admin1c
|
||||
@ -85,16 +83,13 @@ autoinstall:
|
||||
groups: grp1cv8
|
||||
system: true
|
||||
passwd: $6$rounds=4096$7HbuIwc5Gbm.$eDOOBbMBh9teE82CE9MGJXJuK3nRuJpjIbkUqOmPN7FyH/Nj.3bgDosdM1WoztBXHYwgCyd1dhya/5aR36Njm1
|
||||
|
||||
locale: "ru_RU.UTF-8"
|
||||
timezone: Europe/Moscow
|
||||
ntp:
|
||||
enabled: true
|
||||
ntp_client: auto
|
||||
|
||||
package_update: true
|
||||
package_upgrade: true
|
||||
|
||||
write_files:
|
||||
- path: /etc/systemd/system/srv1cv83@.service
|
||||
encoding: gzip+base64
|
||||
@ -116,7 +111,6 @@ autoinstall:
|
||||
ZWjWpJOSN22e1T1B0sm737v37Jl0/JK+SN0ColTD6pWiXk6n8xu5o3E790x+BB1sPS7ZjqqaYxcF
|
||||
d39SjclOrBfGa5OkpvmVTc3Y8272bh6f3+CXxPgOMPHItqZ5xZ2n/WCi+QZPbpIXVCr8towrCtyH
|
||||
yrPp32UKFA+EdjftO0MGs7MtzVHLO261my/TH0B8qt7jBgAA
|
||||
|
||||
- path: /etc/systemd/system/srv1cv83-ras@.service
|
||||
encoding: gzip+base64
|
||||
owner: root:root
|
||||
@ -128,7 +122,6 @@ autoinstall:
|
||||
gqmLPCn5hU7Gby7gaHgPCs+lD0me9+RxMv4cD2W/kqQjNzbHkpALEXxRDkbDUY+9orU17py2qq7m
|
||||
1duSvRMedIJlG1SiDKVu7C55JxqNNtOVqsGoUYlfuQKtPb+10dmmDjsDymQicIl96PLg7dNJtWWK
|
||||
Ipdm1/J/2tGhvJIBAAA=
|
||||
|
||||
- path: /etc/nginx/sites-available/apache-proxy
|
||||
encoding: gzip+base64
|
||||
owner: root:root
|
||||
@ -150,7 +143,6 @@ autoinstall:
|
||||
nRxxNIpiRwDoh+Exg14eHzAOOjMAdYfFeYpuZroxvVjOMPSO5kKdi2OwqrMpLzH7QVnFc8ST5Rdc
|
||||
URZgN5qWdJyF7WtgO//sPyEr/dtHaO+90n5F91WqH0wVWNgzaDuitcgqm24he/ZxrBuyM7TfTP3G
|
||||
tbsgI/Pbhurmo070ccCxM0Sz21vH9JppDQfD3mUYBO6PQ+D4P+kPwX+oL4ivUwgAAA==
|
||||
|
||||
runcmd:
|
||||
# --- fix hosts ---
|
||||
- |
|
||||
@ -158,7 +150,6 @@ autoinstall:
|
||||
echo " " >> /etc/hosts
|
||||
echo "127.0.0.1 localhost srv1c srv1c.local" >> /etc/hosts
|
||||
echo "::1 localhost srv1c srv1c.local" >> /etc/hosts
|
||||
|
||||
# --- force locale install ---
|
||||
- |
|
||||
set -x
|
||||
@ -166,17 +157,14 @@ autoinstall:
|
||||
update-locale LANG=ru_RU.UTF-8
|
||||
export LC_ALL=ru_RU.UTF-8
|
||||
export LANG=ru_RU.UTF-8
|
||||
|
||||
# --- force set timezone ---
|
||||
- timedatectl set-timezone Europe/Moscow
|
||||
|
||||
# --- force apt update ---
|
||||
- |
|
||||
set -x
|
||||
apt-get update
|
||||
apt-get -y dist-upgrade
|
||||
apt-get clean
|
||||
|
||||
# --- install hasp ---
|
||||
- |
|
||||
set -x
|
||||
@ -185,7 +173,6 @@ autoinstall:
|
||||
tar xzf /tmp/ldk/installer.tar.gz --strip-components=1 -C /tmp/ldk
|
||||
sh -xc 'dpkg -i $(find /tmp/ldk -name "aksusb*amd64.deb" -type f)'
|
||||
rm -rf /tmp/ldk
|
||||
|
||||
# --- install ttf-mscorefonts ---
|
||||
- |
|
||||
set -x
|
||||
@ -194,7 +181,6 @@ autoinstall:
|
||||
chown _apt:root /var/lib/update-notifier/package-data-downloads/partial/
|
||||
apt-get install --no-install-recommends --no-install-suggests -y ttf-mscorefonts-installer
|
||||
rm -rf /var/lib/update-notifier/package-data-downloads/partial/*
|
||||
|
||||
# --- install postgres ---
|
||||
- |
|
||||
set -x
|
||||
@ -202,7 +188,6 @@ autoinstall:
|
||||
sh /tmp/pgpro-repo-add.sh
|
||||
rm -f /tmp/pgpro-repo-add.sh
|
||||
apt-get install -y postgrespro-1c-15-contrib postgrespro-1c-15-jit
|
||||
|
||||
# --- postgres init ---
|
||||
- |
|
||||
set -x
|
||||
@ -218,7 +203,6 @@ autoinstall:
|
||||
/opt/pgpro/1c-15/bin/pg-setup service enable
|
||||
/opt/pgpro/1c-15/bin/pg-setup service start
|
||||
apt-get install -y postgrespro-1c-15
|
||||
|
||||
# --- install 1c ---
|
||||
- |
|
||||
set -x
|
||||
@ -236,14 +220,12 @@ autoinstall:
|
||||
# stat /var/install/1c >/dev/null 2>/dev/null && $(find /tmp/1c -name "setup-full-*.run" -type f) --mode unattended --enable-components additional_admin_functions,integrity_monitoring,config_storage_server,client_full,client_thin_fib,liberica_jre,server,server_admin,ws,ru || echo skip 1c install
|
||||
stat /tmp/1c >/dev/null 2>/dev/null && rm -rf /tmp/1c || echo skip 1c install
|
||||
stat /opt/1cv8/x86_64 >/dev/null 2>/dev/null && ln -s $(find /opt/1cv8/x86_64 -name "8.3.*" -type d) /opt/1cv8/x86_64/current || echo skip 1c install
|
||||
|
||||
# --- 1c config ---
|
||||
- |
|
||||
echo \ \ >> /opt/1cv8/conf/conf.cfg
|
||||
echo "JavaHome=/opt/1cv8/x86_64/current/jre" >> /opt/1cv8/conf/conf.cfg
|
||||
echo "JAVA_HOME=/opt/1cv8/x86_64/current/jre" >> /opt/1cv8/conf/conf.cfg
|
||||
echo "UpdateDBCfg=v2" >> /opt/1cv8/conf/conf.cfg
|
||||
|
||||
# --- 1c web init ---
|
||||
- |
|
||||
set -x
|
||||
@ -288,7 +270,6 @@ autoinstall:
|
||||
# enable+start 1c service
|
||||
stat /opt/1cv8/x86_64/current/ragent >/dev/null 2>/dev/null && systemctl enable srv1cv83@current --now || echo ignoring 1c service
|
||||
stat /opt/1cv8/x86_64/current/ras >/dev/null 2>/dev/null && systemctl enable srv1cv83-ras@current --now || echo ignoring 1c ras service
|
||||
|
||||
# --- install & config webpub1c ---
|
||||
- |
|
||||
set -x
|
||||
@ -301,7 +282,6 @@ autoinstall:
|
||||
chown admin1c:root /etc/apache2/conf-available/1c.conf
|
||||
sed -i "s%vrd_path:.*\$%vrd_path: /var/www-1c/vrd%" /home/admin1c/webpub1c/webpub1c.yml
|
||||
sed -i "s%dir_path:.*\$%dir_path: /var/www-1c/pub%" /home/admin1c/webpub1c/webpub1c.yml
|
||||
|
||||
# --- install opt tools ---
|
||||
- |
|
||||
set -x
|
||||
@ -312,14 +292,12 @@ autoinstall:
|
||||
snap install nvim --classic
|
||||
apt-get install -y bat fd-find exa fzf
|
||||
echo "alias bat=batcat" >> /home/admin1c/.bashrc
|
||||
|
||||
# --- install onescript ---
|
||||
- |
|
||||
set -x
|
||||
apt-get install -y mono-runtime libmono-i18n4.0-all
|
||||
curl -SLo /tmp/onescript-engine.deb https://github.com/EvilBeaver/OneScript/releases/download/v1.8.3/onescript-engine_1.8.3_all.deb
|
||||
dpkg -i /tmp/onescript-engine.deb
|
||||
|
||||
# --- install wsdd ---
|
||||
#- |
|
||||
# set -x
|
||||
@ -342,7 +320,6 @@ autoinstall:
|
||||
|
||||
sudo -u admin1c sh -exc "cd /home/admin1c/webpub1c && . venv/bin/activate && python webpub1c.py add_module && python webpub1c.py add test1 && python webpub1c.py add test2 && python webpub1c.py add test3"
|
||||
systemctl restart apache2
|
||||
|
||||
# --- final ---
|
||||
- |
|
||||
set -x
|
||||
@ -351,4 +328,3 @@ autoinstall:
|
||||
# remove default user folder
|
||||
rm -rf /home/ubuntu
|
||||
echo -- done! ---
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user