Skip to content
This repository was archived by the owner on Aug 24, 2024. It is now read-only.

Commit 2db2d95

Browse files
committed
add hashicorp repo support
1 parent a3b7d73 commit 2db2d95

File tree

12 files changed

+124
-128
lines changed

12 files changed

+124
-128
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@ jobs:
9898
sudo docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
9999
100100
- name: Test on ARM64 ${{ matrix.release }}
101-
run: ./tests/distro.sh "arm64v8/ubuntu" ${{ matrix.release }} "arm.yml"
101+
run: ./tests/local.sh --build --distro ubuntu --release "${{ matrix.release }}" --cfg config/arm.yml

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ Also handles adding several tweaks and fixes necessary to add repositories and P
107107
|Visual Studio code | vscode
108108
|Wine HQ | winehq
109109
|Github CLI | github
110+
|Hashicorp Tools(terraform, consul etc) | hashicorp
110111

111112
## Issues & Help
112113

after-effects

Lines changed: 62 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ esac
2121

2222
# SCRIPT METADATA
2323
readonly dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
24-
readonly REL_NAME="6.1.1-RC1"
25-
readonly REL_NUM=611
24+
readonly REL_NAME="6.2.0-RC1"
25+
readonly REL_NUM=620
2626

2727
function _init_printf_variables()
2828
{
@@ -301,7 +301,7 @@ function _init_script_variables()
301301
readonly SOURCES_FILE_DIR=/etc/apt/sources.list.d
302302

303303
# Ping URL
304-
readonly PING_URL="www.google.com"
304+
readonly PING_URL="http://connectivitycheck.gstatic.com/generate_204"
305305

306306

307307
#-------------------------- Release codenames --------------------------------------
@@ -311,7 +311,7 @@ function _init_script_variables()
311311
# 404 is a placeholder which is set when there are
312312
# no suitable releases which can use this feature or
313313
# the release is unknown or too early in developement.
314-
readonly codename_upcoming_release="404"
314+
readonly codename_upcoming_release="hirsute"
315315

316316
readonly codename_current_lts="focal"
317317
readonly codename_previous_lts="bionic"
@@ -572,7 +572,13 @@ function _fix_ubuntu_derivatives()
572572
readonly enable_ppa="true";
573573
readonly python2_disabled="true";
574574
readonly distro_name="ubuntu";
575-
_log_warn "This is Ubuntu 20.10 Groovy Gorilla"
575+
_log_inform "Release is Ubuntu 20.10 Groovy Gorilla"
576+
;;
577+
hirsute ) readonly bool_config_partner_repo="true";
578+
readonly enable_ppa="true";
579+
readonly python2_disabled="true";
580+
readonly distro_name="ubuntu";
581+
_log_warn "Release is Ubuntu 21.04 Hirsute Hippo (Unstable!!)"
576582
;;
577583
stretch | jessie | buster ) bool_is_debian="true";
578584
readonly distro_name="debian";
@@ -607,7 +613,7 @@ function _test_internet_connection ()
607613
{
608614
# Function to check internet connection
609615
_log_info "Checking connectivity"
610-
if wget --tries=5 --timeout=2 "$PING_URL" -O /tmp/ae/testinternet &>/dev/null 2>&1; then
616+
if wget --tries=2 --timeout=10 "$PING_URL" -O /tmp/ae/testinternet &>/dev/null 2>&1; then
611617
rm -f /tmp/ae/testinternet
612618
_log_success "Connected!"
613619
else
@@ -860,6 +866,8 @@ function _set_yaml_config()
860866

861867
_check_bool "add_gh_repo" "${config__add_repo__github[0]}"
862868

869+
_check_bool "add_hashicorp_repo" "${config__add_repo__hashicorp[0]}"
870+
863871

864872
# Other Script Flags
865873
#################################################################################
@@ -1427,15 +1435,30 @@ function add_repositories()
14271435
# Github CLI
14281436
#gh
14291437

1430-
if [ "$add_gh_repo" == "true" ]; then
1431-
_log_info "GitHub CLI(gh)"
1438+
if [ "$add_gh_repo" == "true" ]; then
1439+
_log_info "GitHub CLI(gh)"
1440+
_log_debug "Adding Key to trusted GPG keys directory"
1441+
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C99B11DEB97541F0 |& _log_trace "${_phase_apt_key}" \
1442+
|| _log_error "Adding Github CLI keys failed"
1443+
echo "deb https://cli.github.com/packages ${code_name} main #GitHub-CLI" > ${SOURCES_FILE_DIR}/github-cli.list
1444+
else
1445+
_log_debug "Skipped GitHub CLI(gh)."
1446+
fi
1447+
1448+
# Hashicorp
1449+
if [ "$add_hashicorp_repo" == "true" ]; then
1450+
if [ "$ARCH" == "amd64" ]; then
1451+
_log_info "Hashicorp APT repository"
14321452
_log_debug "Adding Key to trusted GPG keys directory"
1433-
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C99B11DEB97541F0 |& _log_trace "${_phase_apt_key}" \
1434-
|| _log_error "Adding Github CLI keys failed"
1435-
echo "deb https://cli.github.com/packages ${code_name} main #GitHub-CLI" > ${SOURCES_FILE_DIR}/github-cli.list
1453+
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys DA418C88A3219F7B |& _log_trace "${_phase_apt_key}" \
1454+
|| _log_error "Adding Hashicorp GPG keys failed"
1455+
echo "deb [arch=amd64] https://apt.releases.hashicorp.com ${code_name} main#Hashicorp-Packages" > ${SOURCES_FILE_DIR}/hashicorp.list
14361456
else
1437-
_log_debug "Skipped GitHub CLI(gh)."
1457+
_log_error "Hashicorp repositories are not supported on this architecture[$ARCH]!"
14381458
fi
1459+
else
1460+
_log_debug "Skipped adding Hashicorp repos"
1461+
fi
14391462

14401463

14411464
# ROS
@@ -2255,17 +2278,19 @@ function _process_menu()
22552278
__menu_info_add_repo="
22562279
Settings for additional repositories is set as follows.
22572280
-------------------------------------------------------
2258-
Google Chrome, Google Earth : $add_google_repo
2259-
Google Cloud SDK : $add_googlecloud_repo
2260-
GCS-Fuse : $add_gcsfuse_repo
2261-
VS Code : $add_vscode_repo
2262-
Docker Community Edition : $add_docker_repo
2263-
Insync : $add_insync_repo
2264-
Skype : $add_skype_repo
2265-
Signal Desktop : $add_signal_repo
2266-
Mendeley : $add_mendeley_repo
2267-
ROS : $add_ros_repo
2268-
Duo Security for Unix : $add_duo_repo
2281+
Google Chrome & Google Earth : $add_google_repo
2282+
Google Cloud SDK : $add_googlecloud_repo
2283+
GCS-Fuse : $add_gcsfuse_repo
2284+
Visual Studio Code : $add_vscode_repo
2285+
Docker Community Edition : $add_docker_repo
2286+
Insync : $add_insync_repo
2287+
Skype for Linux : $add_skype_repo
2288+
Signal for Desktop : $add_signal_repo
2289+
Mendeley : $add_mendeley_repo
2290+
ROS (Robot Operating System) : $add_ros_repo
2291+
Duo Security for Unix : $add_duo_repo
2292+
GitHub CLI (gh) : $add_gh_repo
2293+
Hashicorp Packages : $add_hashicorp_repo
22692294
22702295
Proceed with this action?
22712296
"
@@ -2554,8 +2579,8 @@ Usage: ${GREEN} [sudo] ./${SCRIPT} ${YELLOW} [options]${NC}
25542579
${YELLOW}
25552580
Non-Action options (can be run as non-root user)
25562581
-------------------------------------------------${NC}
2557-
[-v --version] Display version info
2558-
[-h --help] Display this help message
2582+
[-v --version] Display version info
2583+
[-h --help] Display this help message
25592584
${YELLOW}
25602585
Configuration Options
25612586
-------------------------------------------------${NC}
@@ -2582,13 +2607,14 @@ Other Options
25822607
-------------------------------------------------${NC}
25832608
[-E | --skip-env-checks] Skip some env checks
25842609
[-V | --skip-version-check] Skip checking for latest version
2585-
[-A --autopilot] Enables AUTOPILOT mode(No Prompts)
2610+
[-A | --autopilot] Enables AUTOPILOT mode(No Prompts)
25862611
${GREEN}
2587-
Links & License
2612+
Documentation, License and Version Info
25882613
-------------------------------------------------${NC}
2614+
Version : ${ORANGE}${REL_NAME}${NC}
25892615
GitHub : ${BLUE}https://git.io/Jv08V${NC}
25902616
Documentation : ${BLUE}https://ae.prasadt.com${NC}
2591-
* This script is licensed under GPLv3.
2617+
License : ${ORANGE}GPLv3${NC}
25922618
-------------------------------------------------
25932619
EOF
25942620
}
@@ -2745,20 +2771,11 @@ function main()
27452771
# Did I tell you that I need to call My friends over internet?
27462772
_test_internet_connection;
27472773

2748-
# Checks CI & Containers If running on EC2/GCP/Azure/DO
2749-
_ci_cloud_and_container_checks;
2750-
2751-
# Take care of Mint and other distros
2752-
_fix_ubuntu_derivatives;
2753-
2754-
27552774
_log_stage "Check if config is defined"
27562775

27572776
# Handle Remote YAML
27582777
_log_var "bool_local_config_file" "${bool_local_config_file}"
27592778
_log_var "local_config_file_path" "${local_config_file_path}"
2760-
_log_var "bool_custom_version_file" "${bool_custom_version_file}"
2761-
_log_var "custom_version_file" "${custom_version_file}"
27622779
_log_var "bool_remote_yaml" "${bool_remote_yaml}"
27632780
_log_var "url_remote_yaml" "${url_remote_yaml}"
27642781

@@ -2778,7 +2795,15 @@ function main()
27782795
_log_and_exit "Custom version info file you have specified is not found or not accessible" "36"
27792796
fi
27802797

2798+
# Checks CI & Containers If running on EC2/GCP/Azure/DO
2799+
_ci_cloud_and_container_checks;
2800+
2801+
# Take care of Mint and other distros
2802+
_fix_ubuntu_derivatives;
2803+
27812804
# Get Remote Config File/s, check version & configure
2805+
_log_var "bool_custom_version_file" "${bool_custom_version_file}"
2806+
_log_var "custom_version_file" "${custom_version_file}"
27822807
_version_checks;
27832808

27842809
_set_yaml_config;

after-effects.asc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
-----BEGIN PGP SIGNATURE-----
22

3-
iQIzBAABCgAdFiEE8FV2m9/w2tr5gevHB8IBTKWxN9gFAl/z0ukACgkQB8IBTKWx
4-
N9hTgw/+Iuj2dmp6rWslySn/4Vl43dSG/zDK54Yx0vKn3/fypJS1cywQbiab7ijl
5-
YeEuphG8uHA73dI2oQZgpHWvM1apcAYH3dGtp5SBCZv2d+8nHZxP9PBRQQkVJk8v
6-
SAlERqUyRDlWRpAZcpqINmuIt43HcQNciUOEtPX9satyfJE3IwLj4ARmaAITcGV5
7-
Zh3KrinY8SZCrax7kImuuhfzayEeJyzCSoPHqBxQ/LTmEt6ehsgblWk4Vcmfv1GX
8-
GgMt7kJoGRozzgikbV/KCJZXHJzV5Y710h723A9FzH11RoHg2Mb36oDdO1Qe13fR
9-
djHT/CFboA8GBwAK837ilfTdLq2eg2zql6CyB1dWLeQ9vXRl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C7k0UbEO1Pbhg8nGH2dSM8RwgOge+ry
14+
jq+8dXnDqNrUJrzSVDXqoZnBAwLuO65+0X/4Z+zMHQichWsZamM=
15+
=r8Eq
1616
-----END PGP SIGNATURE-----

config/arm.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ config:
3030
googlecloud: true
3131
gcsfuse: false
3232
spotify: true
33+
hashicorp: true
3334
vscode: true
3435
skype: true
3536
signal: true
@@ -59,7 +60,7 @@ config:
5960
# Follows same pattern as Debian packages
6061
# Name to be saved is second field
6162
binaries:
62-
- https://github.com/kubernetes/kompose/releases/download/v1.19.0/kompose-linux-arm,kompose
63+
- https://storage.googleapis.com/kubernetes-release/release/v1.20.1/bin/linux/arm64/kubectl,kubectl
6364
snaps:
6465
normal:
6566
# No Beta, No classic

config/test-fix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ config:
5858
debian_packages:
5959
- https://github.com/sharkdp/bat/releases/download/v0.16.0/bat-musl_0.16.0_amd64.deb,bat.deb
6060
binaries:
61-
- https://github.com/mikefarah/yq/releases/download/3.4.0/yq_linux_amd64,yq
61+
- https://storage.googleapis.com/kubernetes-release/release/v1.20.1/bin/linux/amd64/kubectl,kubectl
6262
snaps:
6363
normal:
6464
- htop

config/test-suite.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,20 @@ config:
2424
snaps: true
2525
# Repository Flags
2626
add_repo:
27-
googlecloud: true
27+
docker: true
28+
duo: true
2829
gcsfuse: true
29-
spotify: true
30-
vscode: true
31-
skype: true
32-
signal: true
3330
github: true
3431
google: true
32+
googlecloud: true
33+
hashicorp: true
34+
mendeley: false
3535
ros: true
36-
duo: true
36+
signal: true
37+
skype: true
38+
spotify: true
39+
vscode: true
3740
winehq: true
38-
docker: true
39-
mendeley: false
4041

4142
# Flags
4243
flags:
@@ -57,14 +58,14 @@ config:
5758
debian_packages:
5859
- https://github.com/sharkdp/bat/releases/download/v0.16.0/bat-musl_0.16.0_amd64.deb,bat.deb
5960
binaries:
60-
- https://github.com/mikefarah/yq/releases/download/3.4.0/yq_linux_amd64,yq
61+
- https://storage.googleapis.com/kubernetes-release/release/v1.20.1/bin/linux/amd64/kubectl,kubectl
6162
snaps:
6263
normal:
6364
- htop
6465
classic:
6566
- hugo
6667
python2:
67-
- future
68+
- aws
6869
python3:
6970
- coloredlogs
7071
apt:
@@ -85,3 +86,4 @@ config:
8586
- less
8687
external:
8788
- gh
89+
- terraform

config/version.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
api: 3
33
# Configuration
44
version:
5-
number: 611
6-
name: 6.1.1-RC1
5+
number: 620
6+
name: 6.2.0-RC1

docs/changelog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Changelog
22

3-
## 6.1.1
3+
## 6.2.0
44

5+
- **New-Repository** Hashicorp Repository (Terraform, Vault Consul etc)
56
- Fix `-d` and `-k` flags not working properly. [#45](https://github.com/tprasadtp/ubuntu-post-install/issues/45)
7+
- Enable Hirsute Hippo
68

79
## 6.1
810

docs/tasks.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ This task can add the following repositories.
2121
|Visual Studio code | vscode
2222
|Wine HQ | winehq
2323
|Github CLI | github
24+
|Hashicorp Tools(terraform, consul etc) | hashicorp
25+
2426

2527
??? tip "Using `--fix` flag"
2628
Please note that the above repositories are sometimes not updated for latest Ubuntu release and most certainly will not be available for upcoming release of Ubuntu(Alpha/Beta). It might take some time till the repositories are available for the latest release. Use -f or --fix command line option or --pre-release in case you are using a development version of Ubuntu to revert using latest available version of repositories (usually previous Ubuntu release or in case of Beta/Alpha latest stable release of Ubuntu). [For more info see command line options.](/clioptions/#fix-for-latest-ubuntu-releases)

0 commit comments

Comments
 (0)