Permissions problems with openshift client on minishift - macos

I have installed minishift with cask and openshift client with homebrew.
However, as developer user, I am not able to create a project from openshift cli, trigger a build, etc. I always have permissions errors :
Error from server (Forbidden): User "developer" cannot list all project.openshift.io.projectrequests in the cluster
Error from server (Forbidden): User "developer" cannot list authorization.openshift.io.rolebindings in project "my_awesome_project"
Error from server (Forbidden): User "developer" cannot create build.openshift.io.buildconfigs/instantiatebinary in project "my_awesome_project"
However, I am able to create projects from the UI. How can I grant developer user permissions from the command line ?
I am using MacOS High Sierra:
➜ minishift version
minishift v1.15.1+a5c47dd
➜ oc version
oc v3.9.0+191fece
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth
Server https://192.168.99.100:8443
openshift v1.5.0-rc.0+49a4a7a
kubernetes v1.5.2+43a9be4

You should downgrade your client or upgrade your minishift version to match if possible, as they are not 100% API compatible.
You can use the minishift oc binary in an easy way, so you still preserve you're other client if needed (maybe you need to run multiple versions). To do that do:
localhost# eval $(minishift oc-env)
This will execute:
export PATH="/Users/me/.minishift/cache/oc/v3.7.2/darwin:$PATH"
In this way, you'll always be using the same client version as your minishift instance.

The version of oc that you are using (3.9) is not compatible with the server (1.5 / 3.5). Use a newer version of Openshift or downgrade oc to 3.6.

Related

Permission error when starting a microservice with Micro.mu

I have just created a new microservice with micro new <microservice_name> using Micro. I have then installed the needed dependencies (protobuf) and run make proto, as specified in the official documentation. However, when I run micro run ., I get Fork/exec /usr/local/Cellar/go: permission denied:.
I have already tried:
running the same command with sudo;
checking the permissions for /usr/local/Cellar/go (drwxr-xr-x);
checking the permissions for $HOME/bin/micro (.rwxr-xr-x);
reinstalling Go (brew reinstall go).
Nothing changed: I still get the same error message.
I have just found a solution. The issue I was experiencing was related to Homebrew. After uninstalling Go with brew uninstall go and installing it with the official installer for Mac (available at the official download page) I finally managed to start my microservice with micro server and micro run .

bind source path does not exist: /host_mnt

I have a ddev installation on macOS which I used for a while.
ddev 1.16.2
docker 20.10.0
macOS 11.0.1 - Intel
Today I upgraded to docker 20.10.0 and in the process to ddev 1.16.2.
When I start an existing site, that worked all the time I get
Creating ddev-mysite-db ... error
ERROR: for ddev-mysite-db Cannot create container for service db: invalid mount config for type "bind": bind source path does not exist: /host_mnt/Users/me/Documents/Development/WebSite/mysite/.ddev
This started to happen after I upgraded docker from the previous version. Upgrading ddev did not change too much.
Even when I create a new site, the same error message pops up so I am pretty much stuck.
At least for me it looks like the docker 20.10.0 breaks ddev. Any ideas how to deal with that are very much appreciated.
Docker/macOS are not allowing access to the directory ~/Documents.
Starting with macOS Catalina, ~/Documents is a "protected directory", so you have to allow docker access to it, and docker should prompt.
However, Docker Desktop for Mac's 3.0.0 release (which I imagine you're referring to) had a bug where it did not do this properly. I imagine you need to upgrade to version 3.0.1 which was released today. Just "Check for updates"
In Docker > Preferences > Experimental features you can try disabling gRPC, and make Docker use osxfs file sharing system.
Reference: https://github.com/docker/for-mac/issues/4859#issuecomment-689012097

Do I need to install kubectl after installing docker?

Do I need to install kubectl after installing docker? Yet docker comes with its own version of kubeCtl?
I was watching this tutorial and I saw that kubectl was installed after installing docker. Even in the Kubernetes docs they say:
Note: Docker Desktop for Windows adds its own version of kubectl to
PATH. If you have installed Docker Desktop before, you may need to
place your PATH entry before the one added by the Docker Desktop
installer or remove the Docker Desktop's kubectl.
This, to me, seems to imply that it is not uncommon to install kubectl when you have installed one that comes with docker. Why is it so?
You may want to have different version of kubectl in certain scenarios. For example you may want to interact with a remote kuberneretes cluster from the same windows system with latest version of kubectl which may not be installed with docker desktop.
It's generally recommended to have a version of kubectl which matches with the Kubernetes API Server version.

Aws elastic beanstalk cli setup on Mac

I am trying to install aws elastic beanstalk cli on my mac machine. In the prerequisites it says that Python requires following:
Xcode openssl zlib readline
But, on running the command, I get:
-bash: Xcode: command not found
How am I suppose to install this?
An alternative solution is to run the aws cli inside a docker container. It will eliminate the possible issues which may be caused by the OS/library upgrading in the future.

Elastic Beanstalk & Docker - EB CLI Does Not Work on Mac! BUG

When I try and use elastic beanstalk from the command line (ie eb create project) I got the following error.
Select a platform version.
1) Docker 17.03.2-ce
2) Docker 1.12.6
3) Docker 1.11.2
4) Docker 1.9.1
5) Docker 1.7.1
6) Docker 1.6.2
7) Docker 1.5.0
(default is 1): 1
Note: Elastic Beanstalk now supports AWS CodeCommit; a fully-managed source control service. To learn more, see Docs: https://aws.amazon.com/codecommit/
Do you wish to continue with CodeCommit? (y/N) (default is n): n
Do you want to set up SSH for your instances?
(Y/n): y
Select a keypair.
1) patientplatypus
2) phoenixvuenewsly
3) [ Create new KeyPair ]
(default is 2): 1
patientplatypus:~/Documents/newsly_project:11:56:37$eb create newsly_project_production
ERROR: Platform Docker 17.03.2-ce does not appear to be valid
patientplatypus:~/Documents/newsly_project:11:57:44$docker --version
Docker version 17.09.0-ce, build afdb6d4
I thought the above seemed understandable enough, at first. I have version 17.09.0-ce of Docker, but I need version 17.03.2-ce. It would seem reasonable that AWS would be a few versions behind the latest version of Docker if nothing else than to double check system integration and security.
However, when it came time to find version 17.03.2-ce I found it almost impossible. https://github.com/moby/moby/releases points me to 17.03.02-ce as a direct link on the downloads page, which again downloads the wrong version. I tried downloading the link to the static binaries, however that was very confusing. This page https://docs.docker.com/engine/installation/linux/docker-ce/binaries/#next-steps says that in order to get the static binaries to compile I should run the command sudo cp docker/docker /usr/local/bin/, however nowhere in that static binary folder is there a folder labeled docker.
Meanwhile this page https://docs.docker.com/docker-for-mac/release-notes/#docker-community-edition-17090-ce-mac32-2017-10-02-stable, goes from release Docker Community Edition 17.03.1-ce-mac12, 2017-05-12 (stable) to release Docker Community Edition 17.06.0-ce-mac18, 2017-06-28 (stable). Not only does this skip the one release I need, but it seems to have versions that are ahead of the most recent release at https://github.com/moby/moby/releases.
I'm very very confused. It should not be as difficult as this to get the currently stable version of Docker that runs with AWS. Can someone let me know how to resolve this issue?
EDIT:
I spun up my Linux Mint 18 (Ubuntu 16.04) and installed docker to try and get this to work. As it happens linux ALSO installs version Docker version 17.09.0-ce, however this one works with the 1) Docker 17.03.2-ce elastic beanstalk option. All the same commands on a linux environment running the same version of docker now run on eb cli. Therefore I am retitling this post as an EB CLI bug for mac. My question now is, where do I submit a bug report to AWS? I have searched for a github repository for them, but have not found it, and I think that most of their reporting through aws.amazon.com is for enterprise level customers.
Thanks!

Resources