Skip to content

Commit

Permalink
Update package installation docs
Browse files Browse the repository at this point in the history
  • Loading branch information
replaceafill committed Oct 18, 2023
1 parent 691f5ba commit 10c2bad
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 62 deletions.
36 changes: 18 additions & 18 deletions admin-manual/installation-setup/installation/install-rocky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ Installation instructions

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 3
:lines: 5

If your environment uses SELinux, at a minimum you will need to run the
following commands. Additional configuration may be required for your local
setup.

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 5-12
:lines: 7-14

#. Some extra repositories need to be installed in order to fulfill the
installation procedure.
Expand All @@ -39,7 +39,7 @@ Installation instructions

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 14
:lines: 16-17

* Elasticsearch (optional):

Expand All @@ -49,13 +49,13 @@ Installation instructions

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 16-26
:lines: 19-29

* Archivematica - use these commands to install the repositories:

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 28-44
:lines: 31-56

#. Common services like Elasticsearch, MariaDB and Gearmand should be installed
and enabled before the Archivematica install.
Expand All @@ -67,35 +67,35 @@ Installation instructions

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 51-57
:lines: 58-65

#. Now that MariaDB is up and running, create the Archivematica and
Storage Service databases and set up the expected credentials.

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 59-63
:lines: 67-71

#. Install Archivematica Storage Service

* First, install the packages:

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 65
:lines: 73

* Apply the database migrations using the ``archivematica`` user:

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 67-71
:lines: 75-80

* Now enable and start the archivematica-storage-service, rngd (needed for
encrypted spaces) and the Nginx frontend:

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 86-91
:lines: 82-87

.. note:: The Storage Service will be available at ``http://<ip>:8001``.

Expand All @@ -110,25 +110,25 @@ Installation instructions

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 93
:lines: 89

* Apply the database migrations using the ``archivematica`` user:

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 95-100
:lines: 91-96

* Start and enable services:

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 102-105
:lines: 98-101

* Restart Nginx in order to load the dashboard config file:

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 107
:lines: 103

.. note:: The dashboard will be available at ``http://<ip>:81``

Expand All @@ -138,13 +138,13 @@ Installation instructions

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 109
:lines: 105

* Tweak ClamAV configuration:

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 111-112
:lines: 107-108

* Indexless mode:

Expand All @@ -163,7 +163,7 @@ Installation instructions

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 114-121
:lines: 110-117

#. Finalizing installation

Expand Down Expand Up @@ -192,7 +192,7 @@ Installation instructions

.. literalinclude:: scripts/am-rocky-rpm.sh
:language: bash
:lines: 123-125
:lines: 119-121

#. Complete :ref:`Post Install Configuration <rocky-post-install-config>`.

Expand Down
29 changes: 18 additions & 11 deletions admin-manual/installation-setup/installation/install-ubuntu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Ubuntu 22.04 (Jammy) installation instructions

.. literalinclude:: scripts/am-jammy-deb.sh
:language: bash
:lines: 14-18
:lines: 14-19

#. Add Elasticsearch package source (optional). Elasticsearch comes from its own
package repository.
Expand All @@ -37,14 +37,14 @@ Ubuntu 22.04 (Jammy) installation instructions

.. literalinclude:: scripts/am-jammy-deb.sh
:language: bash
:lines: 20-21
:lines: 21-22

#. Update to the most recent OS release. This step will also fetch a list of
the software from the package repositories you just added to your system.

.. literalinclude:: scripts/am-jammy-deb.sh
:language: bash
:lines: 23-24
:lines: 24-25

#. Install some needed packages

Expand All @@ -59,19 +59,26 @@ Ubuntu 22.04 (Jammy) installation instructions

.. literalinclude:: scripts/am-jammy-deb.sh
:language: bash
:lines: 27
:lines: 27-28

#. Now that MySQL is up and running, create the Storage Service database and
set up the expected credentials.

.. literalinclude:: scripts/am-jammy-deb.sh
:language: bash
:lines: 30-32

#. Install the Storage Service package.

.. literalinclude:: scripts/am-jammy-deb.sh
:language: bash
:lines: 29
:lines: 34

#. Configure the Storage Service.

.. literalinclude:: scripts/am-jammy-deb.sh
:language: bash
:lines: 31-32
:lines: 36-37

#. Install the Archivematica packages. The order of installation is important -
the archivematica-mcp-server package must be installed before the dashboard
Expand All @@ -89,7 +96,7 @@ Ubuntu 22.04 (Jammy) installation instructions

.. literalinclude:: scripts/am-jammy-deb.sh
:language: bash
:lines: 34-36
:lines: 39-41

#. Configure the Archivematica components (optional). There are a number of
environment variables that Archivematica recognizes which can be used to
Expand All @@ -112,7 +119,7 @@ Ubuntu 22.04 (Jammy) installation instructions

.. literalinclude:: scripts/am-jammy-deb.sh
:language: bash
:lines: 38
:lines: 43

#. Start Elasticsearch (optional).

Expand All @@ -121,13 +128,13 @@ Ubuntu 22.04 (Jammy) installation instructions

.. literalinclude:: scripts/am-jammy-deb.sh
:language: bash
:lines: 40-42
:lines: 45-47

#. Start the remaining services

.. literalinclude:: scripts/am-jammy-deb.sh
:language: bash
:lines: 44-54
:lines: 49-59

If you have trouble with the gearman or clamav command try restarting it:

Expand All @@ -151,7 +158,7 @@ Ubuntu 22.04 (Jammy) installation instructions

.. literalinclude:: scripts/am-jammy-deb.sh
:language: bash
:lines: 56-59
:lines: 61-65

#. Complete :ref:`Post Install Configuration <ubuntu-post-install-config>`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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';"
Expand All @@ -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
Expand All @@ -80,6 +74,5 @@ sudo -u archivematica bash -c " \
--password=archivematica \
--email="[email protected]" \
--api-key="THIS_IS_THE_SS_APIKEY" \
--superuser";


--superuser
";
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
";

0 comments on commit 10c2bad

Please sign in to comment.