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

Create a Bash Installation Script to install on Bare Metal in a Debian 12 Installation.🔧 #1070

Open
2 tasks done
SylvainMT opened this issue Mar 1, 2024 · 13 comments · May be fixed by #1109
Open
2 tasks done

Create a Bash Installation Script to install on Bare Metal in a Debian 12 Installation.🔧 #1070

SylvainMT opened this issue Mar 1, 2024 · 13 comments · May be fixed by #1109
Labels
enhancement New feature request/PR

Comments

@SylvainMT
Copy link
Contributor

Is this feature missing in the latest version?

  • I'm using the latest release

Is your feature request related to a problem? Please describe.

Have the ability to download a single script to install ARM on Bare-metal install of Debian 12 (Bookworm) machine. Once completed add a wiki page describing the installation process.

Describe the solution you'd like?

I am willing to write the code and submit a Pull Request to complete this enhancement. (I will likely need guidance as I have almost no experience with Git and GitHub)

Describe alternatives you've considered?

I have successfully completed this installation manually. I want to make it easier for others to do the same.

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@SylvainMT SylvainMT added the enhancement New feature request/PR label Mar 1, 2024
Copy link
Contributor

github-actions bot commented Mar 1, 2024

If youre having issues, please remember to read the wiki and follow the instructions carefully

SylvainMT added a commit to SylvainMT/automatic-ripping-machine that referenced this issue Mar 3, 2024
…t to install on Bare Metal in a Debian 12 Installation."

Issue automatic-ripping-machine#1070

Create Script and function "Has_Sudo_Privileges()"
@SylvainMT SylvainMT changed the title Create a Bash Installation Script to install on Bare Metal in a Debian 12 Installation.🔧 <title> Create a Bash Installation Script to install on Bare Metal in a Debian 12 Installation.🔧 Mar 4, 2024
@microtechno9000
Copy link
Collaborator

Thanks for wanting to contribute to ARM, the bare metal install script havent been maintained and should be flagged as unsupported.

You are welcome to update the scripts and associated Wiki to provide users guidance to install. Noting any script should state it is unsupported and may not work due to dependency updates.

Some help can be found here

ARM Contribution
ARM Wiki

@SylvainMT
Copy link
Contributor Author

@microtechno9000 Noted,

I will add a user prompt at the start of the script informing this method of installation is not officially supported.

Almost done with the initial scripting.

I will include updates the the wiki for the Debian install in my pull request.

Question, I haven't been able to determine if there is a Unit Testing methodology applied to ARM. While I understand that there is no real Unit-testing framework for Bash scripts. I would still want to try to provide as much automated testing as possible.

I'm also considering making the bulk of the script Python code, it would make Unit Testing a lot more convenient...

Thanks,

@microtechno9000
Copy link
Collaborator

Thanks, we have started doing unit testing but don't have unit tests for everything

The focus has been on getting the code clearer and where possible adding in unit tests. There is a tests folder, so feel free to add tests to those folders

@SylvainMT
Copy link
Contributor Author

The similarities between Debian 12 and the previous (still supported versions) Debian 10 and Debian 11 are such that it only makes sense to expand this script to work with those versions as well. And since the original script also worked with OpenMediaVault. I plan to test it with Open Media Vault too (versions 7 and 6.5).

@SylvainMT
Copy link
Contributor Author

SylvainMT commented Apr 1, 2024

Update on my previous...

Debian 10's Python version is 3.7. Python 3.7 fails to function with all the requirements of A.R.M. While it is possible to build a more modern version of Python and run it on Debian 10. I am deciding that this is out of the scope of this script. The script will function only with Debian 11, Debian 12 (and by proxy OpenMediaVault 6 and OpenMediaVault 7)

The tested Distribution of Linux are

  • Debian (Bookworm) 12.5
  • Debian (Bullseye) 11.9
  • OpenMediaVault 7.0
  • OpenMediaVault 6.5

The script is still being worked on but can be tested ... TESTING THE SCRIPT SHOULD BE DONE CAREFULLY THE SCRIPT REQUIRES ROOT OR SUDO PRIVELEGES AND AS SUCH HAS THE ABILITIES TO MODIFY YOUR SYSTEM. I HAVE MADE ATTEMPTS TO LIMIT THE IMPACT OF THIS SCRIPT, BUT YOU SHOULD READ IT BEFORE TESTING IT. OR AT THE VERY LEAST RUN IT IN A VM THAT IS ISOLATED FROM ANYTHING ELSE

Be AWARE that the script is being actively developed... It may change at any time, without notice

  1. Download the script: https://raw.githubusercontent.com/SylvainMT/automatic-ripping-machine/feature_Debian-12-Install-Script/scripts/installers/Debian12Installer.sh
  2. Make sure it is executable
  3. sudo ./Debian12Installer.sh -f SylvainMT -t feature_Debian-12-Install-Script (If current user is root, omit the sudo call)

A more detailed How-To will be written to the Wiki and included as part of the pull request, but the above should be enough to test my script.

Please note that this is still actively being developped and the script will change a number of times before I am ready for apull request. But I will welcome any comments and suggestions going forward.

The script,

  1. creates a new user,
  2. allows setting a new password for the arm user (even if the user was pre-existing)
  3. Downloads and compiles the latest version of MakeMKV,
  4. installs all the prereqs for A.R.M.,
  5. Downloads arm via Git (if a previous version of A.R.M. is found, it will ask the user for permission to delete it first).
  6. Creates a Python Virtual Environment,
  7. Installs a new SystemD service (new one to work with the virtual environment)
  8. creates fstab entries for each of the found optical drives,
  9. starts the ArmUI service (again a new one created to work with the python virtual environment)
  10. runs the /setup page to create the initial database.
  11. Provides a link using the IP address and port to access A.R.M.

The script accepts 3 optional options

  • [-f (ForkName)] (Currently, unless you fork my repo, my repo is the only fork supported...)
  • [-t (TagOrBranchName)] (Currently, unless you fork my repo, my repo is the only fork supported..).
  • [-p (PortNumber)] (Port number cannot be between 1~1024)

I thank anyone willing to test this script and provide feedback...

@SylvainMT
Copy link
Contributor Author

I have created the first draft of the wiki page. https://github.com/SylvainMT/automatic-ripping-machine/blob/feature_Debian-12-Install-Script/arm_wiki/Setting-up-ARM-script-(Debian-OMV).md

Please note that this is still a draft.

Please note that the wiki entry names the script as DebianInstaller.sh This is not a mistake, in a future update I plan to change the name of the file to DebianInstaller.sh from Debian12Installer.sh.

@shitwolfymakes
Copy link
Member

I appreciate the effort you've put into this, but just so you're aware: we dropped bare metal support in favor of Docker last year, in part because of why you've had to drop support for Debian 10. This change will become permanent in 3.0, as we are in the process of migrating this to a multi-container application architecture.

I started on this project doing what your doing now, so I don't want you to feel like you've wasted time once this happens!

@SylvainMT
Copy link
Contributor Author

@shitwolfymakes I understand that.

The main reason I started this script is that the Docker install, creates a barior to entry. When I first started using Arm it took me over a week to figure out how to get it running. A lot of that (not all) was complicated by the fact that I had no idea what Docker was besides it being a container and yet another layer of abstraction. And therefore yet another layer I had to pass through the hardware.

My hope is to make this simpler for first time users. And when version 3 comes out I will see what can be done to simplify the install process. Since right now, the level of technical knowledge required to get this running is not exactly 0.

@shitwolfymakes
Copy link
Member

Good to know! What would you change about the Docker installation instructions? I haven't heard that kind of feedback about it before.

@SylvainMT
Copy link
Contributor Author

Of the top of my head.

Now that I understand Docker a bit better, I wonder why start_arm_container.sh is a bash script and not a Docker compose Yaml file.

Since the install script does need to look for and create mnt points for the optical drives why not also edit the start script to add the correct entries for the optical drives

Correctly indicate, that as it stands now the Docker container only supports Nvidia without any modifications to the Docker image. (having the UI show an X besides intel and amd, leads one to believe that simply installing the drivers on the host should be enough.) and clear instructions on what needs to be done to get nvidia working if present...

The script should also test that the host can fully access the optical drives before proceeding. And alert the user if some access is missing. (not every one installs arm on a bare metal machine. I myself use proxmox, knowing that some access was missing from the get go would have made my debugging efforts easier...)

I would update, change the script before updating and changing the wiki. But both need to be done.
This was an easier project to tackle for me to start. Now I may start looking at the actual Docker install process and make a PR. After I am done this... Which I almost am.

I will however not proceed with install scripts for Ubuntu and RHEL based systems like I originally intended to and will work more on the Docker install for future contributions...

Fair?

@shitwolfymakes
Copy link
Member

This is great feedback, thanks! I definitely don't want to be a killjoy, I just want to make sure you know what's coming down the pipeline. I look forward to seeing the changes you make.

@SylvainMT SylvainMT linked a pull request Apr 11, 2024 that will close this issue
28 tasks
@SylvainMT
Copy link
Contributor Author

For those wishing to test this script, the file name has changed. Now use these steps:

  1. Download the script: https://raw.githubusercontent.com/SylvainMT/automatic-ripping-machine/feature_Debian-12-Install-Script/scripts/installers/DebianInstaller.sh
  2. Make sure it is executable sudo chmod +x DebianInstaller.sh (if current user is root, omit the sudo call)
  3. sudo ./DebianInstaller.sh -f SylvainMT -t feature_Debian-12-Install-Script (If current user is root, omit the sudo call)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature request/PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants