-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
691f5ba
commit 10c2bad
Showing
4 changed files
with
61 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,6 @@ | |
|
||
set -euxo pipefail | ||
|
||
sudo sed -i 's/#$nrconf{restart} = '"'"'i'"'"';/$nrconf{restart} = '"'"'a'"'"';/g' /etc/needrestart/needrestart.conf | ||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password your_password' | ||
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password your_password' | ||
|
@@ -13,25 +11,21 @@ sudo debconf-set-selections <<< "archivematica-mcp-server archivematica-mcp-serv | |
sudo debconf-set-selections <<< "archivematica-mcp-server archivematica-mcp-server/mysql/app-pass password demo" | ||
sudo debconf-set-selections <<< "archivematica-mcp-server archivematica-mcp-server/app-password-confirm password demo" | ||
|
||
|
||
|
||
sudo wget -O - https://packages.archivematica.org/1.15.x/key.asc | sudo apt-key add - | ||
sudo wget -O - https://packages.archivematica.org/GPG-KEY-archivematica-sha512 | sudo apt-key add - | ||
|
||
#sudo sh -c 'echo "deb [arch=amd64] http://packages.archivematica.org/1.15.x/ubuntu jammy main" > /etc/apt/sources.list.d/archivematica.list' | ||
sudo sh -c 'echo "deb [arch=amd64] http://packages.archivematica.org/1.15.x/ubuntu-externals jammy main" > /etc/apt/sources.list.d/archivematica-externals.list' | ||
sudo sh -c 'echo "deb [trusted=yes] https://jenkins-ci.archivematica.org/repos/am-packbuild/1.15.0/jammy ./" > /etc/apt/sources.list.d/archivematica-jenkins.list' | ||
sudo sh -c 'echo "deb [trusted=yes] https://jenkins-ci.archivematica.org/repos/am-packbuild/0.21.0/jammy ./" > /etc/apt/sources.list.d/archivematica-jenkins-ss.list' | ||
|
||
|
||
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - | ||
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list | ||
|
||
sudo apt-get update | ||
sudo apt-get -y upgrade | ||
|
||
sudo apt-get install -y htop ntp apt-transport-https unzip openjdk-8-jre-headless | ||
sudo apt-get install -y openjdk-8-jre-headless mysql-server | ||
sudo apt-get install -y elasticsearch | ||
sudo apt-get install -y mysql-server | ||
|
||
sudo mysql -e "DROP DATABASE IF EXISTS SS; CREATE DATABASE SS CHARACTER SET utf8 COLLATE utf8_unicode_ci;" | ||
sudo mysql -e "CREATE USER 'archivematica'@'localhost' IDENTIFIED BY 'demo';" | ||
|
@@ -53,7 +47,7 @@ sudo service elasticsearch restart | |
sudo systemctl enable elasticsearch | ||
|
||
sudo service clamav-freshclam restart | ||
sleep 120s | ||
sleep 30s | ||
sudo service clamav-daemon start | ||
sudo service gearman-job-server restart | ||
sudo service archivematica-mcp-server start | ||
|
@@ -80,6 +74,5 @@ sudo -u archivematica bash -c " \ | |
--password=archivematica \ | ||
--email="[email protected]" \ | ||
--api-key="THIS_IS_THE_SS_APIKEY" \ | ||
--superuser"; | ||
|
||
|
||
--superuser | ||
"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
set -euxo pipefail | ||
|
||
sudo yum -y update | ||
|
||
# Allow Nginx to use ports 81 and 8001 | ||
sudo semanage port -m -t http_port_t -p tcp 81 | ||
sudo semanage port -a -t http_port_t -p tcp 8001 | ||
|
@@ -53,13 +55,8 @@ gpgkey=https://packages.archivematica.org/GPG-KEY-archivematica-sha512 | |
enabled=1 | ||
EOF' | ||
|
||
|
||
|
||
|
||
|
||
sudo -u root yum -y update | ||
sudo -u root yum install -y java-1.8.0-openjdk-headless | ||
sudo -u root yum install -y elasticsearch mariadb-server gearmand | ||
sudo -u root yum install -y java-1.8.0-openjdk-headless mariadb-server gearmand | ||
sudo -u root yum install -y elasticsearch | ||
sudo -u root systemctl enable elasticsearch | ||
sudo -u root systemctl start elasticsearch | ||
sudo -u root systemctl enable mariadb | ||
|
@@ -79,20 +76,8 @@ sudo -u archivematica bash -c " \ | |
set -a -e -x | ||
source /etc/sysconfig/archivematica-storage-service | ||
cd /usr/lib/archivematica/storage-service | ||
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py migrate"; | ||
|
||
sudo -u archivematica bash -c " \ | ||
set -a -e -x | ||
source /etc/default/archivematica-storage-service || \ | ||
source /etc/sysconfig/archivematica-storage-service \ | ||
|| (echo 'Environment file not found'; exit 1) | ||
cd /usr/lib/archivematica/storage-service | ||
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py create_user \ | ||
--username=test \ | ||
--password=test \ | ||
--email="[email protected]" \ | ||
--api-key="THIS_IS_THE_SS_APIKEY" \ | ||
--superuser"; | ||
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py migrate | ||
"; | ||
|
||
sudo -u root systemctl enable archivematica-storage-service | ||
sudo -u root systemctl start archivematica-storage-service | ||
|
@@ -134,3 +119,17 @@ sudo -u root systemctl restart archivematica-mcp-server | |
sudo firewall-cmd --add-port=81/tcp --permanent | ||
sudo firewall-cmd --add-port=8001/tcp --permanent | ||
sudo firewall-cmd --reload | ||
|
||
sudo -u archivematica bash -c " \ | ||
set -a -e -x | ||
source /etc/default/archivematica-storage-service || \ | ||
source /etc/sysconfig/archivematica-storage-service \ | ||
|| (echo 'Environment file not found'; exit 1) | ||
cd /usr/lib/archivematica/storage-service | ||
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py create_user \ | ||
--username=test \ | ||
--password=test \ | ||
--email="[email protected]" \ | ||
--api-key="THIS_IS_THE_SS_APIKEY" \ | ||
--superuser | ||
"; |