[Ubuntu] Get rid of simple apt-get provisioners (#2376)

* move 7z installation to basic.sh

* remove build essential

* move imagemagick to apt

* move subversion to apt

* move subversion to apt

* move sphinxsearch to apt

* move swig to apt

* move pollinate to apt

* move haveged to apt

* add p7zip to ubuntu 16
This commit is contained in:
Mikhail Timofeev
2021-01-11 10:42:58 +03:00
committed by GitHub
parent df05e8c6cb
commit 31c97aac43
15 changed files with 52 additions and 137 deletions

View File

@@ -1,11 +0,0 @@
#!/bin/bash -e
################################################################################
## File: 7-zip.sh
## Desc: Installs 7-zip
################################################################################
# Install 7-Zip
apt-get update -y
apt-get install -y p7zip p7zip-full p7zip-rar
invoke_tests "Tools" "7-Zip"

View File

@@ -1,18 +0,0 @@
#!/bin/bash -e
################################################################################
## File: build-essential.sh
## Desc: Installs build-essential package
################################################################################
source $HELPER_SCRIPTS/install.sh
PACKAGE=build-essential
# Test to see if the software in question is already installed, if not install it
echo "Checking to see if the installer script has already been run"
if ! IsPackageInstalled $PACKAGE; then
echo "Installing $PACKAGE"
apt-get install -y --no-install-recommends $PACKAGE
else
echo "$PACKAGE is already installed"
fi

View File

@@ -1,12 +0,0 @@
#!/bin/bash -e
################################################################################
## File: image-magick.sh
## Desc: Installs ImageMagick
################################################################################
# Install ImageMagick
apt-get install -y --no-install-recommends --fix-missing \
imagemagick \
libmagickcore-dev \
libmagickwand-dev \
libmagic-dev

View File

@@ -1,10 +0,0 @@
#!/bin/bash -e
################################################################################
## File: pollinate.sh
## Desc: Installs Pollinate
################################################################################
# Install Pollinate
apt-get install -y --no-install-recommends pollinate
invoke_tests "Tools" "Pollinate"

View File

@@ -1,10 +0,0 @@
#!/bin/bash -e
################################################################################
## File: rndgenerator.sh
## Desc: Install random number generator
################################################################################
# Install haveged
apt-get -y install haveged
invoke_tests "Tools" "Haveged"

View File

@@ -1,10 +0,0 @@
#!/bin/bash -e
################################################################################
## File: subversion.sh
## Desc: Installs Subversion client
################################################################################
# Install Subversion
apt-get install -y --no-install-recommends subversion
invoke_tests "Tools" "SVN"

View File

@@ -1,6 +0,0 @@
#!/bin/bash -e
# Install Swig
sudo apt-get install -y swig
invoke_tests "Tools" "Swig"

View File

@@ -9,6 +9,21 @@ Describe "Apt" {
}
It "<toolName> is available" -TestCases $testCases {
if ($toolName -eq "p7zip-full")
{
$toolName = "p7zip"
}
if ($toolName -eq "subversion")
{
$toolName = "svn"
}
if ($toolName -eq "sphinxsearch")
{
$toolName = "searchd"
}
(Get-Command -Name $toolName).CommandType | Should -BeExactly "Application"
}
}

View File

@@ -1,9 +1,3 @@
Describe "7-Zip" {
It "7z" {
"7z" | Should -ReturnZeroExitCode
}
}
Describe "azcopy" {
It "azcopy" {
#(azcopy --version) command returns exit code 1 (see details: https://github.com/Azure/azure-storage-azcopy/releases)
@@ -181,30 +175,12 @@ Describe "Sbt" {
}
}
Describe "Sphinx" {
It "sphinx" {
"searchd -h" | Should -ReturnZeroExitCode
}
}
Describe "Selenium" {
It "Selenium Server 'selenium-server-standalone.jar' is installed" {
"/usr/share/java/selenium-server-standalone.jar" | Should -Exist
}
}
Describe "SVN" {
It "svn" {
"svn --version" | Should -ReturnZeroExitCode
}
}
Describe "Swig" {
It "swig" {
"swig -version" | Should -ReturnZeroExitCode
}
}
Describe "Terraform" {
It "terraform" {
"terraform --version" | Should -ReturnZeroExitCode
@@ -311,12 +287,6 @@ Describe "Packer" {
}
}
Describe "Pollinate" {
It "pollinate" {
"sudo pollinate -r && sleep 5 && sudo grep pollinate /var/log/syslog" | Should -ReturnZeroExitCode
}
}
Describe "Pulumi" {
It "pulumi" {
"pulumi version" | Should -ReturnZeroExitCode
@@ -329,12 +299,6 @@ Describe "Phantomjs" {
}
}
Describe "Haveged" {
It "haveged" {
"systemctl status haveged | grep 'active (running)'" | Should -ReturnZeroExitCode
}
}
Describe "Containers" -Skip:(Test-IsUbuntu16) {
$testCases = @("podman", "buildah", "skopeo") | ForEach-Object { @{ContainerCommand = $_} }

View File

@@ -131,11 +131,13 @@
],
"apt": {
"common_packages": [
"build-essential",
"dbus",
"dnsutils",
"dpkg",
"fakeroot",
"gnupg2",
"imagemagick",
"iproute2",
"iputils-ping",
"lib32z1",
@@ -147,6 +149,9 @@
"libgsl-dev",
"libgtk-3-0",
"libicu55",
"libmagic-dev",
"libmagickcore-dev",
"libmagickwand-dev",
"libsecret-1-dev",
"libsqlite3-dev",
"libunwind8",
@@ -154,6 +159,8 @@
"libxss1",
"locales",
"openssh-client",
"p7zip-rar",
"p7zip",
"pkg-config",
"rpm",
"texinfo",
@@ -174,18 +181,24 @@
"file",
"flex",
"ftp",
"haveged",
"jq",
"m4",
"mediainfo",
"netcat",
"p7zip-full",
"parallel",
"pass",
"patchelf",
"pollinate",
"rsync",
"shellcheck",
"sphinxsearch",
"sqlite3",
"ssh",
"subversion",
"sudo",
"swig",
"telnet",
"time",
"unzip",

View File

@@ -127,11 +127,13 @@
],
"apt": {
"common_packages": [
"build-essential",
"dbus",
"dnsutils",
"dpkg",
"fakeroot",
"gnupg2",
"imagemagick",
"iproute2",
"iputils-ping",
"lib32z1",
@@ -142,6 +144,9 @@
"libgconf-2-4",
"libgsl-dev",
"libgtk-3-0",
"libmagic-dev",
"libmagickcore-dev",
"libmagickwand-dev",
"libsecret-1-dev",
"libsqlite3-dev",
"libunwind8",
@@ -149,6 +154,7 @@
"libxss1",
"locales",
"openssh-client",
"p7zip-rar",
"pkg-config",
"rpm",
"texinfo",
@@ -169,18 +175,24 @@
"file",
"flex",
"ftp",
"haveged",
"jq",
"m4",
"mediainfo",
"netcat",
"parallel",
"pass",
"p7zip-full",
"patchelf",
"pollinate",
"rsync",
"shellcheck",
"sqlite3",
"sphinxsearch",
"ssh",
"subversion",
"sudo",
"swig",
"telnet",
"time",
"unzip",

View File

@@ -100,11 +100,13 @@
],
"apt": {
"common_packages": [
"build-essential",
"dbus",
"dnsutils",
"dpkg",
"fakeroot",
"gnupg2",
"imagemagick",
"iproute2",
"iputils-ping",
"lib32z1",
@@ -115,6 +117,9 @@
"libgconf-2-4",
"libgsl-dev",
"libgtk-3-0",
"libmagic-dev",
"libmagickcore-dev",
"libmagickwand-dev",
"libsecret-1-dev",
"libsqlite3-dev",
"libunwind8",
@@ -122,6 +127,7 @@
"libxss1",
"locales",
"openssh-client",
"p7zip-rar",
"pkg-config",
"python-is-python3",
"rpm",
@@ -143,18 +149,24 @@
"file",
"flex",
"ftp",
"haveged",
"jq",
"m4",
"mediainfo",
"netcat",
"p7zip-full",
"parallel",
"pass",
"patchelf",
"pollinate",
"rsync",
"shellcheck",
"sphinxsearch",
"sqlite3",
"ssh",
"subversion",
"sudo",
"swig",
"telnet",
"time",
"unzip",

View File

@@ -169,7 +169,6 @@
{
"type": "shell",
"scripts": [
"{{template_dir}}/scripts/installers/7-zip.sh",
"{{template_dir}}/scripts/installers/ansible.sh",
"{{template_dir}}/scripts/installers/azcopy.sh",
"{{template_dir}}/scripts/installers/azure-cli.sh",
@@ -177,7 +176,6 @@
"{{template_dir}}/scripts/installers/basic.sh",
"{{template_dir}}/scripts/installers/aliyun-cli.sh",
"{{template_dir}}/scripts/installers/aws.sh",
"{{template_dir}}/scripts/installers/build-essential.sh",
"{{template_dir}}/scripts/installers/nvm.sh",
"{{template_dir}}/scripts/installers/clang.sh",
"{{template_dir}}/scripts/installers/swift.sh",
@@ -197,7 +195,6 @@
"{{template_dir}}/scripts/installers/haskell.sh",
"{{template_dir}}/scripts/installers/heroku.sh",
"{{template_dir}}/scripts/installers/hhvm.sh",
"{{template_dir}}/scripts/installers/image-magick.sh",
"{{template_dir}}/scripts/installers/java-tools.sh",
"{{template_dir}}/scripts/installers/kubernetes-tools.sh",
"{{template_dir}}/scripts/installers/oc.sh",
@@ -212,7 +209,6 @@
"{{template_dir}}/scripts/installers/oras-cli.sh",
"{{template_dir}}/scripts/installers/phantomjs.sh",
"{{template_dir}}/scripts/installers/php.sh",
"{{template_dir}}/scripts/installers/pollinate.sh",
"{{template_dir}}/scripts/installers/postgresql.sh",
"{{template_dir}}/scripts/installers/pulumi.sh",
"{{template_dir}}/scripts/installers/ruby.sh",
@@ -221,16 +217,12 @@
"{{template_dir}}/scripts/installers/julia.sh",
"{{template_dir}}/scripts/installers/sbt.sh",
"{{template_dir}}/scripts/installers/selenium.sh",
"{{template_dir}}/scripts/installers/sphinx.sh",
"{{template_dir}}/scripts/installers/subversion.sh",
"{{template_dir}}/scripts/installers/terraform.sh",
"{{template_dir}}/scripts/installers/packer.sh",
"{{template_dir}}/scripts/installers/vcpkg.sh",
"{{template_dir}}/scripts/installers/vercel.sh",
"{{template_dir}}/scripts/installers/dpkg-config.sh",
"{{template_dir}}/scripts/installers/mongodb.sh",
"{{template_dir}}/scripts/installers/rndgenerator.sh",
"{{template_dir}}/scripts/installers/swig.sh",
"{{template_dir}}/scripts/installers/netlify.sh",
"{{template_dir}}/scripts/installers/android.sh",
"{{template_dir}}/scripts/installers/pypy.sh",

View File

@@ -172,7 +172,6 @@
{
"type": "shell",
"scripts": [
"{{template_dir}}/scripts/installers/7-zip.sh",
"{{template_dir}}/scripts/installers/ansible.sh",
"{{template_dir}}/scripts/installers/azcopy.sh",
"{{template_dir}}/scripts/installers/azure-cli.sh",
@@ -180,7 +179,6 @@
"{{template_dir}}/scripts/installers/basic.sh",
"{{template_dir}}/scripts/installers/aliyun-cli.sh",
"{{template_dir}}/scripts/installers/aws.sh",
"{{template_dir}}/scripts/installers/build-essential.sh",
"{{template_dir}}/scripts/installers/clang.sh",
"{{template_dir}}/scripts/installers/swift.sh",
"{{template_dir}}/scripts/installers/cmake.sh",
@@ -200,7 +198,6 @@
"{{template_dir}}/scripts/installers/haskell.sh",
"{{template_dir}}/scripts/installers/heroku.sh",
"{{template_dir}}/scripts/installers/hhvm.sh",
"{{template_dir}}/scripts/installers/image-magick.sh",
"{{template_dir}}/scripts/installers/java-tools.sh",
"{{template_dir}}/scripts/installers/kubernetes-tools.sh",
"{{template_dir}}/scripts/installers/oc.sh",
@@ -216,7 +213,6 @@
"{{template_dir}}/scripts/installers/oras-cli.sh",
"{{template_dir}}/scripts/installers/phantomjs.sh",
"{{template_dir}}/scripts/installers/php.sh",
"{{template_dir}}/scripts/installers/pollinate.sh",
"{{template_dir}}/scripts/installers/postgresql.sh",
"{{template_dir}}/scripts/installers/pulumi.sh",
"{{template_dir}}/scripts/installers/ruby.sh",
@@ -225,16 +221,12 @@
"{{template_dir}}/scripts/installers/julia.sh",
"{{template_dir}}/scripts/installers/sbt.sh",
"{{template_dir}}/scripts/installers/selenium.sh",
"{{template_dir}}/scripts/installers/sphinx.sh",
"{{template_dir}}/scripts/installers/subversion.sh",
"{{template_dir}}/scripts/installers/terraform.sh",
"{{template_dir}}/scripts/installers/packer.sh",
"{{template_dir}}/scripts/installers/vcpkg.sh",
"{{template_dir}}/scripts/installers/vercel.sh",
"{{template_dir}}/scripts/installers/dpkg-config.sh",
"{{template_dir}}/scripts/installers/mongodb.sh",
"{{template_dir}}/scripts/installers/rndgenerator.sh",
"{{template_dir}}/scripts/installers/swig.sh",
"{{template_dir}}/scripts/installers/netlify.sh",
"{{template_dir}}/scripts/installers/android.sh",
"{{template_dir}}/scripts/installers/pypy.sh",

View File

@@ -172,7 +172,6 @@
{
"type": "shell",
"scripts": [
"{{template_dir}}/scripts/installers/7-zip.sh",
"{{template_dir}}/scripts/installers/ansible.sh",
"{{template_dir}}/scripts/installers/azcopy.sh",
"{{template_dir}}/scripts/installers/azure-cli.sh",
@@ -180,7 +179,6 @@
"{{template_dir}}/scripts/installers/basic.sh",
"{{template_dir}}/scripts/installers/aliyun-cli.sh",
"{{template_dir}}/scripts/installers/aws.sh",
"{{template_dir}}/scripts/installers/build-essential.sh",
"{{template_dir}}/scripts/installers/clang.sh",
"{{template_dir}}/scripts/installers/swift.sh",
"{{template_dir}}/scripts/installers/cmake.sh",
@@ -200,7 +198,6 @@
"{{template_dir}}/scripts/installers/haskell.sh",
"{{template_dir}}/scripts/installers/heroku.sh",
"{{template_dir}}/scripts/installers/hhvm.sh",
"{{template_dir}}/scripts/installers/image-magick.sh",
"{{template_dir}}/scripts/installers/java-tools.sh",
"{{template_dir}}/scripts/installers/kubernetes-tools.sh",
"{{template_dir}}/scripts/installers/oc.sh",
@@ -216,7 +213,6 @@
"{{template_dir}}/scripts/installers/oras-cli.sh",
"{{template_dir}}/scripts/installers/phantomjs.sh",
"{{template_dir}}/scripts/installers/php.sh",
"{{template_dir}}/scripts/installers/pollinate.sh",
"{{template_dir}}/scripts/installers/postgresql.sh",
"{{template_dir}}/scripts/installers/pulumi.sh",
"{{template_dir}}/scripts/installers/ruby.sh",
@@ -225,16 +221,12 @@
"{{template_dir}}/scripts/installers/julia.sh",
"{{template_dir}}/scripts/installers/sbt.sh",
"{{template_dir}}/scripts/installers/selenium.sh",
"{{template_dir}}/scripts/installers/sphinx.sh",
"{{template_dir}}/scripts/installers/subversion.sh",
"{{template_dir}}/scripts/installers/terraform.sh",
"{{template_dir}}/scripts/installers/packer.sh",
"{{template_dir}}/scripts/installers/vcpkg.sh",
"{{template_dir}}/scripts/installers/vercel.sh",
"{{template_dir}}/scripts/installers/dpkg-config.sh",
"{{template_dir}}/scripts/installers/mongodb.sh",
"{{template_dir}}/scripts/installers/rndgenerator.sh",
"{{template_dir}}/scripts/installers/swig.sh",
"{{template_dir}}/scripts/installers/netlify.sh",
"{{template_dir}}/scripts/installers/android.sh",
"{{template_dir}}/scripts/installers/pypy.sh",