how to downgrade gitlab-runner or to run with specific version? - homebrew

After I upgrade gitlab-runner to version 11.11.0 I can't run local jobs, like gitlab-runner exec docker job_setup. Always, I receive an error:
$ gitlab-runner exec docker job_setup
Runtime platform arch=amd64 os=darwin pid=1688 revision=6c154264 version=11.11.0
Running with gitlab-runner 11.11.0 (6c154264)
Using Docker executor with image ubuntu:16.04 ...
Pulling docker image ubuntu:16.04 ...
Using docker image sha256:2a697363a8709093834e852b26bedb1d85b316c613120720fea9524f0e98e4a2 for ubuntu:16.04 ...
Running on runner--project-0-concurrent-0 via HappyMeal2.local...
DEPRECATION: this GitLab server doesn't support refspecs, gitlab-runner 12.0 will no longer work with this version of GitLab
Cloning repository...
fatal: repository '/Users/rui/(...)/helm-deploy-service-example' does not exist
ERROR: Job failed: exit code 1
FATAL: exit code 1
But with gitlab-runner 11.10.0 works well.
I'm trying to downgrade gitlab-runner with brew install gitlab-runner#11.10.0 but it's not working:
$ brew install gitlab-runner#11.10.0
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
No changes to formulae.
Error: No available formula with the name "gitlab-runner#11.10.0"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
How to downgrade gitlab-runner or to run with version 11.11.0?

I found a solution:
I uninstalled the last version that I installed with homebrew
I installed a manual setup of gitlab-runner at version 11.10.0
$ brew uninstall gitlab-runner
$ rm -rf /Users/$(whoami)/Library/LaunchAgents/gitlab-runner.plist
$ sudo curl --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/v11.10.0/binaries/gitlab-runner-darwin-amd64
$ sudo chmod +x /usr/local/bin/gitlab-runner
$ cd ~
$ gitlab-runner install
$ gitlab-runner start
Posted on behalf of the question asker

Related

How to install docker correctly in ubuntu 22.04 is it possible at this time?

I am following the docker installation tutorial in ubuntu: https://docs.docker.com/desktop/linux/install/ubuntu/
And when I try this step: sudo apt install ./docker-desktop-4.8.1-amd64.deb I am getting the next error: E: Unsupported file ./docker-desktop-4.8.1-amd64.deb given on commandline
Not sure what that means or if I am missing something.
E: Unsupported file ./docker-desktop-4.8.1-amd64.deb given on commandline
I also tried with:
curl https://desktop-stage.docker.com/linux/main/amd64/74134/docker-desktop.deb --output docker-desktop.deb
sudo apt install ./docker-desktop.deb
And got the error:
E: Invalid archive signature
E: Internal error, could not locate member control.tar{.zst,.lz4,.gz,.xz,.bz2,.lzma,}
E: Could not read meta data from /home/rodolfo/docker-desktop.deb
E: The package lists or status file could not be parsed or opened.
Any ideas?
According to official documentation, and the steps I followed to install docker in Ubuntu 22.04 LTS
Visit the following site https://docs.docker.com/engine/install/ubuntu/
Scroll down until you find the Install using the convenience script section.
You will find the following commands:
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ DRY_RUN=1 sh ./get-docker.sh
the first command will install a shell script with the all needed commands and the other will run this shell script.
You can test the installation by running these commands
$ sudo docker --version
$ sudo docker info
If it looks fine, you now have docker in your machine.
Optional step is to download docker desktop for Ubuntu 22.04
https://docs.docker.com/desktop/linux/install/
MAKE SURE You already installed docker engine before installing docker desktop for Ubuntu
Try moving the DEB file to HOME folder or Change the directory in terminal to the folder where the file is downloaded
So I had the same problem and the solution was to go to the folder root that I downloaded the deb file in it wish is Downloads for me and I rerun the commend
My issue ended up being Ubuntu 22.04 was installed with wsl version 1.
wsl -l -v
NAME STATE VERSION
Ubuntu-22.04 Running 1
wsl --set-version Ubuntu-22.04 2

Ansible Docker containers dynamic inventory on MacOS

I have started a Docker container using the following command:
docker run tomcat:latest
Then I created a file named docker.yml with the following contents:
plugin: community.docker.docker_containers
docker_host: unix://var/run/docker.sock
Finally I try to obtain a list of the currently running Docker containers using:
ansible-inventory -i docker.yml --list
However instead of a list of running containers, I only get the following result:
[WARNING]: * Failed to parse docker.yml with yaml plugin: Plugin configuration YAML file, not YAML inventory
[WARNING]: * Failed to parse docker.yml with constructed plugin: Incorrect plugin name in file: community.docker.docker_containers
[WARNING]: Unable to parse docker.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
{
"_meta": {
"hostvars": {}
},
"all": {
"children": [
"ungrouped"
]
}
}
Have I misunderstood the Ansible Docker containers dynamic inventory or am I doing something wrong?
I suspect I had a case of system in disarray and this was the cure:
I retained my current Python installation located at ~/Library/Python/3.9/.
Attempted to uninstall Ansible using pip:
pip uninstall ansible
Manually removed all things Ansible:
sudo rm -r /etc/ansible
sudo rm -r -/.ansible
sudo rm -r /usr/local/lib/python3.9/site-packages/ansible*
sudo rm /usr/local/bin/ansible*
Performed a fresh installation of Ansible:
pip install ez_setup
pip install --user ansible
Installed Ansible Docker collection prerequisite:
pip install docker
Installed Ansible Docker collection:
ansible-galaxy collection install community.docker
After the above, the Ansible Docker container dynamic inventory works as expected and without errors.

docker Error with pre-create check: "We support Virtualbox starting with version 5

I'm trying to create docker machine host using the following command in fedora OS version 25.
docker-machine create -driver=virtualbox host01
I get below error while executing the command.
Error with pre-create check: "We support Virtualbox starting with version 5. Your VirtualBox install is \"WARNING:
The vboxdrv kernel module is not loaded.
Either there is no module available for the current kernel (4.10.12-200.fc25.x86_64) or it failed to load.
Please try load the kernel module by executing as root
dnf install akmod-VirtualBox kernel-devel-4.10.12-200.fc25.x86_64 akmods --kernels 4.10.12-200.fc25.x86_64 && systemctl restart systemd-modules-load.service
You will not be able to start VMs until this problem is fixed.\\n5.1.26r117224\".
Please upgrade at https://www.virtualbox.org"
I have already virtualbox latest version installed. Running the command suggested by
sudo dnf install akmod-VirtualBox kernel-devel-4.10.12-200.fc25.x86_64 akmods --kernels 4.10.12-200.fc25.x86_64 && systemctl restart systemd-modules-load.service
I got the below error
Last metadata expiration check: 0:48:35 ago on Thu Aug 17 22:38:47 2017.
Package akmods-0.5.6-7.fc25.noarch is already installed, skipping.
No package --kernels available.
No package 4.10.12-200.fc25.x86_64 available.
Any suggestions?
I also had this problem and for this I upgrade Virtual box to 5.2 using following commands. This link help me
sudo apt-get remove virtualbox virtualbox-5.1
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian xenial contrib" >> /etc/apt/sources.list.d/virtualbox.list'
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-5.2
Hope this helps.
For windows users, in 2022 such problem still exists. So for those who use last build (now it is virtualBox-6.1.32-149290-Win), try to use version that starts with prefix 5. But not all '5' versions work. For example, for me worked only version 5.2.42 while versions: 5.2.18, 5.2.20, 5.2.44 didn't work
Helped for win 11 x64

Docker: Error pulling image, executable file not found in $PATH

I'm trying to pull some image, and have strange error:
sudo docker pull wnameless/oracle-xe-11g
Pulling repository wnameless/oracle-xe-11g
f8d224b82290: Error pulling image (latest) from wnameless/oracle-xe-11g, Untar exit status 1 exec: "xz": executable file not found in $PATH found in $PATH ror downloading dependent layers
2014/11/28 23:08:26 Error pulling image (latest) from wnameless/oracle-xe-11g, Untar exit status 1 exec: "xz": executable file not found in $PATH
Strange, but Ubuntu image works fine
sudo docker run -i -t ubuntu
System version:
Linux Mint 17 Qiana
Kernel version 3.13.0
Issue 9327 was introduced in 1.3.2 and should be fixed in 1.4.0, so 1.3.1 should be fine (beside lack of security fixes which caused this regression). If you creating images with mkimage.sh in 1.3.2 next fix will help:
$ > git diff
diff --git a/contrib/mkimage.sh b/contrib/mkimage.sh
index cd2fa74..fda16ab 100755
--- a/contrib/mkimage.sh
+++ b/contrib/mkimage.sh
## -71,7 +71,7 ## nameserver 8.8.8.8
nameserver 8.8.4.4
EOF
-tarFile="$dir/rootfs.tar.xz"
+tarFile="$dir/rootfs.tar.bz2"
touch "$tarFile"
(
## -82,7 +82,7 ## touch "$tarFile"
echo >&2 "+ cat > '$dir/Dockerfile'"
cat > "$dir/Dockerfile" <<'EOF'
FROM scratch
-ADD rootfs.tar.xz /
+ADD rootfs.tar.bz2 /
EOF
# if our generated image has a decent shell, let's set a default command
As result, this problem was only in latest version of Docker (lxc-docker package, version > 1.3.x). I have removed this package, and install docker.io package (v. 1.0.1). Now everything is fine.

Can't start elasticsearch server via Homebrew

So I have installed elasticsearch through brew:
$ brew install elasticsearch
Then when I run the elasticsearch server:
elasticsearch -f -D es.config=/usr/local/Cellar/elasticsearch/0.19.3/config/elasticsearch.yml
I get this error:
{0.20.4}: Setup Failed ...
- FailedToResolveConfigException[Failed to resolve config path [/usr/local/Cellar/elasticsearch/0.19.3/config/elasticsearch.yml], tried file path [/usr/local/Cellar/elasticsearch/0.19.3/config/elasticsearch.yml], path file [/usr/local/Cellar/elasticsearch/0.20.4/config/usr/local/Cellar/elasticsearch/0.19.3/config/elasticsearch.yml], and classpath]
How can I fix this? Any ideas och suggestions are welcome.
I did this and it had worked for me:
Get the package:
$ curl -k -L -o elasticsearch-0.20.2.tar.gz http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.2.tar.gz
Unzipp:
$ tar -zxvf elasticsearch-0.20.2.tar.gz
Run the elasticsearch server:
./elasticsearch-0.20.2/bin/elasticsearch -f
try with
elasticsearch -f -Des.path.conf=/usr/local/Cellar/elasticsearch/0.19.3/config/
That's weird, my install asked me to run elasticsearch slightly different. I got it running with:
Install
$ brew update
$ brew install elasticsearch
Run Elasticsearch
$ elasticsearch --config=/usr/local/opt/elasticsearch/config/elasticsearch.yml
As #karmi said, brew info elasticsearch shows how to run elasticsearch on your system.
Things haven't been changed in 2021.
Homebrew stops distributing newer version of elasticsearch, and kibana, although you can still get outdated versions in homebrew-core.
It's beacause Homebrew defers to the OSI's open source licence definition. The new license used by elastic softwares is not compatible with it, and Homebrew rufuses to distribute them.
So, elastic begins to distribute these software with its own custom tap.
# tap maintained by elastic organization
# https://github.com/elastic/homebrew-tap
brew tap elastic/tap
brew install elastic/tap/elasticsearch-full
# brew install elastic/tap/kibina-full
# brew install elastic/tap/logstash-full

Resources