Cannot seem to install Google Cloud Managed VMs - docker

Following Google instructions to install managed VMs, everything seems to work smoothly until I get to this step:
gcloud preview app setup-managed-vms
The result is the following error:
ERROR: (gcloud.preview.app) Invalid choice: 'setup-managed-vms'.
I've made sure all the other dependent components are up to date.
The environment is:
Windows 7 x64
Google Cloud SDK 0.9.56
boot2docker 1.4.1/1.5 (tried both)
Is there anything obvious I'm missing trying to get these managed VMs working?

Yep - that step is no longer required. The docs should be fixed shortly.
You might wish to look at My java App Engine Managed VMs build doesn't deploy after 4/14/2015 update for additional info.
Our images are now available on the public Google Container registry. For python, you can grab the image at gcr.io/google_appengine/python-compat
It is important to note that you must do the following to use that image:
docker pull gcr.io/google_appengine/python-compat
You can change the FROM line in your Dockerfile. Also, it's important to note that this image does not have the GAE SDK included, but you can add most python libraries yourself.

Related

OAuth error when attempting to start-host for chrome-remote-desktop on GCE

I'm running CentOS 7 in a Google Compute Engine VM, and trying to connect to it via Chrome Remote Desktop. When I run the start-host command, it fails with "OAuth error" and no more information.
I accessed the https://remotedesktop.google.com/headless site with Chrome, filled out the choices, and went through the authorization phase. There was not an option for CentOS, so I chose "Debian" and when it gave me the connect command, I replaced the path to start-host with the CentOS one of /usr/lib64/chrome-remote-desktop/start-host, and running the resulting command fails.
I did the likely web searches and found some fairly old and unhelpful information, but nothing useful.
If I can't get Chrome Remote Desktop working, I'd be willing to try another method to run GUI-based applications (in this case, IBM's oneWEX). I can get X11 to sort-of work remotely, but not well enough to run oneWEX.
This is the command I got from the Chrome site, modified to work with CentOS:
DISPLAY= /usr/lib64/chrome-remote-desktop/start-host --code="<code>" --redirect-url="https://remotedesktop.google.com/_/oauthredirect" --name=
The start-host command asked the expected questions of the computer name and PIN, then gave the error:
Couldn't start host: OAuth error.
When you get the code from https://remotedesktop.google.com/headless it is only good for a few minutes, and only one time use.
Just go back to https://remotedesktop.google.com/headless follow the prompts and get a new code for every attempt.
In my case, I got another error when I first ran the command. I tried to resolve it, and reran the same command (with the original code). I kept getting the "Couldn't start host: OAuth error." until I figured out I needed to get a new code from https://remotedesktop.google.com/headless for each attempt.
FYI: The error message is not given right away, but after entering the computer name and double entering the pin.
According to https://bugs.chromium.org/p/chromium/issues/detail?id=1039016, this could apparently also happen if the /usr/lib64/chrome-remote-desktop/start-host binary is not one from the "official" DEBian package built and distributed by Google, but one built from source e.g. by yourself or your Linux distribution (such as the chrome-remote-desktop package built by Fedora; https://bugzilla.redhat.com/show_bug.cgi?id=1788448 aims to clarify how to use that one).
What I can see here is that you previously added some libraries to your CentOS instance, I tried replicating the error myself and inside my CentOS 7 instance (from Compute Engine) I don't seem to have any /usr/lib64/chrome-remote-desktop/ folder.
Or is it from your local machine?
I had the same error and found that refreshing the headless page to get a new code string in the command worked.

Unable to download the Jenkins plugins running on Google Cloud Platform

I'm running the Jenkins as a Docker container on a Virtual Machine on Google Cloud Platform. On the very first screen of setup, I can see that a lot of plugins did not install in my Jenkins server?
Please let me know how to resolve this issue? Is it something due to with the security on the cloud by default which restricts downloading of plugins?
Refer following link for screenshot:-
https://storage.googleapis.com/mydockerissues/Jenkins%20Plugins%20Issue.PNG
Cheers
Something similar happened to me when running Jenkins on Docker on my local machine. To get everything to install I had to keep retrying. It took several retries but eventually I got everything installed.
I'm not sure why this is the case. Maybe it fails downloads whose dependencies aren't installed yet?

docker error while loading shared libraries (RHEL 7.5)

I installed Docker on a Red Hat Enterprise Linux Server 7.5 (Maipo) system:
docker version
Version: 1.13.1
API version: 1.26
Package version: docker-1.13.1-58.git87f2fab.e17.x86_64
OS/Arch: linux/amd64
Now if I try to run a docker image, I get errors similar to this:
docker run docker.io/jupyter/datascience-notebook
tini: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
I have searched for help and have already taken a multitude of possible actions:
libraries seem to be linked correctly
all libraries are up to date
Hello-World example works
I also came across information saying that running containers from docker.io / hub.docker.com under RHEL is not supported - which I don't really get, as main purpose of docker is to enable running programs independent from their OS...?
https://access.redhat.com/solutions/1408853 Does this mean using docker under RHEL does not really provide me with the possibility of easily deploying/sharing a docker-image with non-RHEL users?
Also, does this mean I can only access and use official RHEL-docker images?
https://access.redhat.com/containers/?start=90#/search/
As I wanted to use docker to have ready-to-go environments with R-Python/Jupyter/H2o (and similar), I'm disappointed because I could not find suitable images for RHEL there.
So, my questions would be:
Is it possible to run docker.io / hub.docker.com images under RHEL7.5?
if not, could I share my own created docker images under RHEL7.5 to other users with different OS versions?
Are there other projects / sites to share docker-images for data science purposes on RHEL?
Would you agree that my next step would be: building my own docker-image, adding R/Python/jupyter step by step?
Best regards,
workah0lic
This error message
tini: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
comes from within the container image. It could be a corrupted container image, but the message is also printed when the glibc dynamic linker determines that the kernel features are not sufficient for loading libc.so.6. I looked at the image (digest is sha256:79f929bd0e58fa9cb238dceda48b0c8360e748d09b476b429216c93dac0bd783), and it appears to require kernel 3.2, so the Red Hat Enterprise Linux 7 kernel version of 3.10 should be sufficient.
In fact, I cannot reproduce this problem with kernel-3.10.0-862.6.3.el7.x86_64 and docker-1.13.1-58.git87f2fab.el7.x86_64. You could try to run this command to obtain additional information about dynamic linker behavior:
docker run -e LD_DEBUG=all docker.io/jupyter/datascience-notebook

.Net Core application fails to publish to GCP App Engine becuase of MVC.Abstractions

This is my first foyer into .Net Core and App Engines, so please forgive me if I sound uninformed.
We have a .Net Core Application that we're trying to get published to a GCP App engine (obviously). when I run dotnet publish -c Release it builds just fine without any errors. When I test the program locally it runs just fine and I'm able to access it. However whenever I try to get it on GCP I get the following error:
Updating service [default] (this may take several minutes)...
.................................................................................................................................................failed.
ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error:
Error:
An assembly specified in the application dependencies manifest (ApplicationName.deps.json) was not found:
package: 'Microsoft.AspNetCore.Mvc.Abstractions', version: '2.0.2'
path: 'lib/netstandard2.0/Microsoft.AspNetCore.Mvc.Abstractions.dll'
This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
aspnetcore-store-2.0.5.xml
Failed to deploy project WebApiDotNetCore to App Engine Flex.
We tried removing it from the dependencies JSON, and that just ended up breaking everything, so it is indeed required. It is installed in the project via nuget, so it should be included with dotnet restore. I've looked around and some sources seem to think that it's the installation of the dotnet core sdk, but I've tried it on three computers and always get the same thing.
Lastly, I should say this happens when I try to deploy through command line as well as directly through Visual Studio with the GCP SDK.
Has anyone experienced this error, or something similar? Any advice or guidance is very much appreciated.
Thanks!
-BT
OP REVISION
As an update I was able to get this resolved aside from the fact that I get a 502 error when I try to load the application. Here are the steps I took for anyone else that is looking what to do:
Pre-reqs: Docker for Windows and Google Cloud SDK installed and running. Running turned out to be a pain with Docker for Windows. Many many restarts and reinstallations.
Open the solution and ensure that the startup project is set correctly.
Right click the startup Project, and select Add > Docker Support.
Select Linux in the popup window and allow the files to be created.
When complete, the Dockerfile should appear in the preview window. Do the following:
For me the first line read: FROM microsoft/aspnetcore:2.0 AS base. Change this to FROM microsoft/aspnetcore-build:2.0 AS base.
Additionally, check to make sure that the last line has the correct .dll name. Docker for Windows will put whatever the project name is rather than the class name, so for me my final .dll names were different than the project name.
Lastly, if your project has any dependencies that are required to run but not to build, then you'll need to manually add them. For me we have a couple of XML files that needed to be put in the app folder, so I had to add COPY *.xml /app/ and put those files in the same folder as the solution file is in.
If there's anything else you need to do to the Dockerfile I highly recommend this page. It's a how-to on all Dockerfile commands written in ENGLISH! (that was my biggest problem with all of this - I have little experience with Linux and even less with Docker and everything was written in Greek for me).
Create an app.yaml file. I just used the standard:
runtime: custom
env: flex
Copy the Dockerfile found in the startup project's folder into the folder with the solution.
Initialize gcloud to the right project, then navigate to the solution folder. The type gcloud app deploy app.yaml, and follow the onscreen guide.
for me it takes about 15 minutes to deploy the GCP, so depending on the complexity of your project it may take longer, though this one is rather complex.
Now I'm trying to figure out my 502 error... I've tried what seems like everything - changing the listening port in the application, exposing the listening port on the dockerfile, trying to get GCP to open that port, and trying half a dozen different ports. It's slow-going since it's such a chore to deploy each time.
Hope this helps anyone that was like me a couple weeks ago and had never even heard of Docker!
Which version of .NET Core is this? Also, have you tried to run in Cloud Shell? Maybe that will provide more clues on what might be wrong.
It looks that you don't have the Microsoft.AspNetCore.Mvc.Abstractions library installed in your system. Using the .NET CLI, type the following command:
dotnet add package Microsoft.AspNetCore.Mvc.Abstractions --version 2.0.2
After that, to ensure the library is included, run the following:
dotnet restore
dotnet build
Try running it locally (it should work), and then use the dotnet publish -c Release command again.

Tag latest not found in repository docker.io/library/centos on Redhat Enterprise Linux behind proxy server

I have installed and pulled from docker.io successfully many times on Redhat Enterprise Linux. But now I am having a very difficult time with a slightly different environment behind a proxy server.
I am starting to think there is a modification Redhat has done to the docker packages preventing my proxy setting from working correctly. When I try to do a simple "docker pull centos", I get the frustrating error: "Tag latest not found in repository docker.io/library/centos". I have tried other tags as well with no luck. Before I put the proxy setting in, I received "authorizationrequired" messages. I got past that by adding the proxy info to /etc/sysconfig/docker. Then I received x509 errors. I got past that by adding the appropriate certificate file to docker. Now, with everything seemingly correct, I am unable to do a simple pull. From what I can tell, this is not an issue with stock docker. Is there something else that needs to be done to make the redhat docker package work with a proxy? Any help is greatly appreciated. I tried everything in another stackoverflow question to no avail.
Everything looked like it was working from the cli. However, I ran /var/log/messages | grep docker to look at the docker daemon logs. I was still getting certificate errors. I loaded hub.docker.com into my browser and extracted the certificate chain. I put those in /etc/docker/certs.d/docker.io and it worked part-way.
I needed to add those proxy certs to the global location and now it works all the way.

Resources