Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bare metal deployments #1055

Merged
merged 6 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions modules/ROOT/pages/depl-examples/bare-metal.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,26 +73,38 @@ Note that this URL must resolve to the server running this installation.

=== Install and configure the Infinite Scale Binary

* Download and install the Infinite Scale binary. To get the stable binary from ownCloud, visit {ocis-downloadpage-url}/{download-type}/?sort=time&order=desc[download.owncloud.com,window=_blank], select the version and the platform of choice and copy the link of the file.
* Download and install the Infinite Scale binary. To get the stable binary from ownCloud, visit {ocis-downloadpage-url}/{download-type}/?sort=time&order=desc[download.owncloud.com,window=_blank], select the version and the platform of choice and copy the link of the file. Replace `<file_url>` and `<version>` in the commands accordingly.
+
--
Download the source:
mmattel marked this conversation as resolved.
Show resolved Hide resolved

[source,bash,subs="attributes+"]
----
sudo wget -O {ocis_bin}/ocis <file_url>
sudo wget -P {ocis_bin} <file_url>
----
--

* Make the binary executable with:
+
[source,bash,subs="attributes+"]
----
sudo chmod +x {ocis_bin}/ocis
sudo chmod a+x {ocis_bin}/ocis-<version>
----

* Create a link from the source to the final executable named `ocis`: +
mmattel marked this conversation as resolved.
Show resolved Hide resolved
Note when using a link to the source, upgrading and/or testing is much easier.
mmattel marked this conversation as resolved.
Show resolved Hide resolved
+
[source,bash,subs="attributes+"]
----
sudo ln -s {ocis_bin}/ocis-<version> {ocis_bin}/ocis
----

* Check the version installed:
+
--
[source,bash]
[source,bash,subs="attributes+"]
----
ocis version --skip-services
ocis version --skip-services
----

The output looks like this:
Expand All @@ -102,8 +114,12 @@ The output looks like this:
Version: {compose_version}
Compiled: {ocis-compiled}
----

Note that if you omit `--skip-services`, you will get additional information about services printed.
--

NOTE: If you already have a running instance, you must stop and restart the instance to activate the new version.

=== Create a Service User

* In your operating system, create a user and group who will run the ocis service and own all the files of the Infinite Scale service but is not allowed to log in, has no shell and no home directory.
Expand Down
70 changes: 27 additions & 43 deletions modules/ROOT/pages/depl-examples/minimal-bare-metal.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,22 @@ For those who want to skip reading the full document, use this summary of comman

IMPORTANT: With this approach, the system you install Infinite Scale on *must* have a GUI present. A headless system has different requirements and needs an extended setup, see xref:accessing-infinite-scale-other-than-localhost[Accessing Infinite Scale Other Than Localhost].

Define a stable binary to use as replacement for `<file_url>` via {ocis-downloadpage-url}/{download-type}/?sort=time&order=desc[download.owncloud.com,window=_blank].
Define a stable binary to use as replacement for `<file_url>` via {ocis-downloadpage-url}/{download-type}/?sort=time&order=desc[download.owncloud.com,window=_blank], replace `<version>` in the command accordingly.

[source,bash,subs="attributes+"]
----
sudo wget -O {ocis_bin}/ocis <file_url>
sudo wget -P {ocis_bin} <file_url>
mmattel marked this conversation as resolved.
Show resolved Hide resolved
----

[source,bash,subs="attributes+"]
----
sudo chmod +x {ocis_bin}/ocis
sudo chmod a+x {ocis_bin}/ocis-<version>
----

[source,bash,subs="attributes+"]
----

sudo ln -s {ocis_bin}/ocis-<version> {ocis_bin}/ocis
----

[source,bash]
Expand All @@ -85,25 +91,31 @@ Congratulations, you now have access to your Infinite Scale instance.

== Installation

* To get the stable binary from ownCloud, visit {ocis-downloadpage-url}/{download-type}/?sort=time&order=desc[download.owncloud.com,window=_blank], select the version and the platform of choice and copy the link of the file. Check the sort order on the modification date to get the most recent releases on top. Depending on your system and preferences, you may want to save the binary in `{ocis_bin}`.
* To get the stable binary from ownCloud, visit {ocis-downloadpage-url}/{download-type}/?sort=time&order=desc[download.owncloud.com,window=_blank], select the version and the platform of choice and copy the link of the file. Check the sort order on the modification date to get the most recent releases on top. Depending on your system and preferences, you may want to save the binary in `{ocis_bin}`. Replace `<file_url>` and `<version>` in the commands accordingly.
+
--
To download use:
Download the source:
mmattel marked this conversation as resolved.
Show resolved Hide resolved

[source,bash,subs="attributes+"]
----
sudo wget -O {ocis_bin}/ocis <file_url>
sudo wget -P {ocis_bin} <file_url>
----
--

* Make the binary executable with:
+
--
[source,bash,subs="attributes+"]
----
sudo chmod +x {ocis_bin}/ocis
sudo chmod a+x {ocis_bin}/ocis-<version>
----

* Create a link from the source to the final executable named `ocis`: +
mmattel marked this conversation as resolved.
Show resolved Hide resolved
Note when using a link to the source, upgrading and/or testing is much easier.
mmattel marked this conversation as resolved.
Show resolved Hide resolved
+
[source,bash,subs="attributes+"]
----
sudo ln -s {ocis_bin}/ocis-<version> {ocis_bin}/ocis
----
--

* Check the version installed:
+
Expand All @@ -124,6 +136,8 @@ Compiled: {ocis-compiled}
Note that if you omit `--skip-services`, you will get additional information about services printed.
--

NOTE: If you already have a running instance, you must stop and restart the instance to activate the new version.

== Getting Command Line Help

To get a list of available options and commands type:
Expand Down Expand Up @@ -237,46 +251,16 @@ ps ax | grep ocis | grep -v grep
[source,plaintext]
----
221297 pts/1 Sl 0:04 ocis server
221706 pts/0 Sl 0:00 ocis proxy
221706 pts/0 Sl 0:00 ocis notifications
----

== Stopping Infinite Scale

Depending on what you want to stop, different commands need to be applied.
To properly stop Infinite Scale, the signal `SIGTERM` (15) is used. Note that SIGTERM politely asks a process to terminate. It will terminate gracefully, cleaning up all resources (files, sockets, child processes, etc.), deleting temporary files and so on. Do not use `SIGKILL` (9) as this will initiate a dirty shutdown.

If a service is being terminated with its PID, the signal `SIGTERM` (-15) is used. Note that SIGTERM politely asks a process to terminate. It will terminate gracefully, cleaning up all resources (files, sockets, child processes, etc.), deleting temporary files and so on. Do not use `SIGKILL` (-9) as this will initiate a dirty shutdown.
The following command stops the runtime with all its services plus any extra started services which are not part of the runtime and have been started manually. Depending on the user you started `ocis` with and which user you are currently logged in as, you may need to use `sudo` for the killall command for proper permissions.

Stopping the complete runtime with all its running services::
Depending on the user you started `ocis` with and which user you are currently logged in as, you may need to use `sudo` for the kill command for proper permissions.
+
[source,bash]
----
ps -ax | \
grep "ocis server" | \
grep -v grep | \
awk '{ print $1 }' | \
xargs sudo kill -15
----

Stopping a particular ocis PID::
First identify which PID you want to terminate:
+
[source,bash]
----
ps ax | grep "ocis" | grep -v grep
----
+
This may give an output like the following:
+
[source,plaintext]
----
221297 pts/1 Sl 0:04 ocis server
221706 pts/0 Sl 0:00 ocis proxy
----
+
To terminate the `ocis proxy` service type the following command, where `sudo` may not be necessary depending on the permissions of the logged-in user. Replace the PID according the output from above:
+
[source,bash]
----
sudo kill -15 221706
killall -v -s 15 ocis
----