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

setup: added script to auto install mtda aritfacts to system #200

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

boksheos
Copy link

@boksheos boksheos commented Feb 7, 2022

As an end user perspective this script will help to install mtda and its artifacts automatically following are the scripts features

  1. identify the distro debian OR ubuntu if others gives an message unsupported and untested
  2. It will prompt user 5 options 1) mtda 2) mtda-kvm 3) mtda-docker 4) all 5) quit
  3. script will install all the above options

Scope for improvement :

  1. script can be extended to any future host package dependencies
  2. Can be extended to install LAVA server and respective setup
  3. future installation can be implemented for other distro support using pip

Note : This script is initial draft for mtda auto install which will help user in quick installation.
Signed-off-by: Onkar Bokshe [email protected]

dist_name() {
if [ -f /etc/os-release ]; then
# shellcheck disable=SC1091
dist=$(. /etc/os-release && echo "${ID}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not recommended to source /etc/os-release

scripts/setup-mtda Outdated Show resolved Hide resolved
Comment on lines 83 to 101
docker_install() {
apt-get -y remove docker docker-engine docker.io containerd runc
apt-get update -y
apt-get -y install \
ca-certificates \
curl \
gnupg \
lsb-release
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update -y
apt-get -y install docker-ce docker-ce-cli containerd.io
/sbin/adduser $USER docker
systemctl enable docker
systemctl start docker
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debian and Ubuntu provide docker.io

@boksheos boksheos force-pushed the mtda-setup branch 3 times, most recently from c5a3a2a to 7e4fdf3 Compare February 7, 2022 17:49
scripts/setup-mtda Outdated Show resolved Hide resolved
scripts/setup-mtda Outdated Show resolved Hide resolved
scripts/setup-mtda Outdated Show resolved Hide resolved
# ---------------------------------------------------------------------------------------------------------------------

docker_install() {
apt-get -y remove docker docker-engine docker.io containerd runc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why we need to remove those?

scripts/setup-mtda Outdated Show resolved Hide resolved
scripts/setup-mtda Outdated Show resolved Hide resolved
scripts/setup-mtda Outdated Show resolved Hide resolved
@boksheos boksheos force-pushed the mtda-setup branch 3 times, most recently from 450fd84 to aa04d57 Compare February 10, 2022 12:42
@boksheos boksheos removed their assignment Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants