Repository: deis/deis

Issue:
CoreOS on Google Compute Engine
Could you add Compute Engine to contrib?

http://googlecloudplatform.blogspot.cz/2014/05/official-coreos-images-are-now-available-on-google-compute-engine.html?m=1



Discussion:
Yes, we would love to, just trying to find some bandwidth to do so. We would welcome a pull request  for GCE support!

@JosefJezek, check out some great work on Deis in GCE by @andyshinn here: https://gist.github.com/andyshinn/a78b617b2b16a2782655

How do we feel about adding this gist to `contrib/gce/README.md` after a little more testing and cleanup?

@andyshinn Would love to test that PR as a contrib/ entry - I'd be happy to test!

@andyshinn We'd need to find a way to use our shared contrib/coreos/user-data file, though, and provide a provision script that automates as much of the work as possible. Both Rackspace and EC2 require a little setup, but then are one-command provisions.

I think @bacongobbler investigated this recently and found the `gce` client to be fairly unstable. 

> found the gce client to be fairly unstable

translation: I was debugging for hours why I could not create volumes with `gcutil` following your instructions and there was no support help to try and get this thing going unless I paid for support. Still waiting on a response email. `gold-apparatus` is the project ID which I created:

```
><> gcloud auth login
You are now logged in as [me@bacongobbler.com].
Your current project is [None].  You can change this setting by running:
  $ gcloud config set project <project>
><> gcloud config set project gold-apparatus
><> gcutil adddisk --zone us-central1-a --size_gb 32 cored1 cored2 cored3
WARNING: You have selected a volume size of under 200 GB. This may result in reduced performance. For sizing and performance guidelines, see https://developers.google.com/compute/docs/disks#pdperformance.
+------+------+--------+-----------+---------+
| name | zone | status | disk-type | size-gb |
+------+------+--------+-----------+---------+
Error: The resource 'projects/gold-apparatus' was not found
Error: The resource 'projects/gold-apparatus' was not found
Error: The resource 'projects/gold-apparatus' was not found
```

Don't waste too much time on it. I'll go through it again next week and fix it up. These are just beautified notes from the first time I ran through it.

One thing that comes to mind though is the fact that Compute Engine via the CLI doesn't work until you actually load it once in the browser. Did you try navigating to the project, then to Compute Engine, then VM instances in the browser first? I know it sounds strange. But I had to do this to sort of 'initialize' the Compute Engine to get it working on CLI.

For anyone following this issue, please give https://gist.github.com/andyshinn/a78b617b2b16a2782655 a peek / try. I made some significant changes and a good run-through. I'll next try to create a script to use the existing user-data in contrib and merge in the mount creation units. Then it should be ready for a pull request.

@andyshinn Is that really a fact? I'm not sure I had to do it. You have to sign up on the web first beyond that everything worked fine from the CLI for me. Maybe I wasn;t paying enough attention though.

Now I have no more doubts in the DNS, because the official documentation only talks about configure each point, but not "shows" how. 

I also saw that you changed the "cloud-config", but still different than it has in the "contrib->coreos" folder, why? 

Friday I tried to create a cluster with this, CoreOS stable (367.1.0), but had some trouble with the ETCD, who did not start correctly. With the latest Alpha version could install, but after "up" an application it did not work, and did not appear in the list of services of Fleetctl (this also happened with vagrant, where 3 nodes).

I will test with this update and back to say. 

Thanks help again!

The cloud config is mostly just stripped down to what is needed. The
contrib version assumes a CoreOS that didn't start Docket automatically.
This one also formats the data disk for Docker storage.

Let us know how it goes!
On Jul 28, 2014 7:27 PM, "Jadson" notifications@github.com wrote:

> Now I have no more doubts in the DNS, because the official documentation
> only talks about configure each point, but not "shows" how.
> 
> I also saw that you changed the "cloud-config", but still different than
> it has in the "contrib->coreos" folder, why?
> 
> Friday I tried to create a cluster with this, CoreOS stable (367.1.0), but
> had some trouble with the ETCD, who did not start correctly. With the
> latest Alpha version could install, but after "up" an application it did
> not work, and did not appear in the list of services of Fleetctl (this also
> happened with vagrant, where 3 nodes).
> 
> I will test with this update and back to say.
> 
> Thanks help again!
> 
> —
> Reply to this email directly or view it on GitHub
> https://github.com/deis/deis/issues/1036#issuecomment-50427548.

ok, it worked with the normal version of this CoreOS, very cool. 

I was mistaken about what the DNS says, calmly looked and saw that you created just two entries for the same IP, the load balancer. Sorry.

the command to create the VMs only one correction: **--disk** (is missing a dash) 

Could also follow the same typing that has the documentation of Deis (http://deis.io/get-deis/), to create the cluster, for eg, using the sign "**=**" for each tag, like: **hosts=10.240.0.10**, just a detail. 

---

I still get this error when installing the Deis Client by PIP in OSX: 

```
Traceback (most recent call last):
  File "/usr/local/bin/deis", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
    working_set.require(__requires__)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: requests==2.2.1
```

only works pre-compiled, good. 

---

I think we're close to having an official documentation for GCE. See that CoreOS is now starting images on GCE, and is an easy starting point for anyone who wants to see Deis in _production_ (soon), compared to other clouds (DO). 

I'll leave this active cluster for a few more days and more testing, etc.. 

Just one last question, since CoreOS have stable version, and Deis works on it, then we should use this version or the same that we use in Vagrant? 

Thanks again for the great work, and help.


Resolving patch:
diff --git a/client/setup.py b/client/setup.py
--- a/client/setup.py
+++ b/client/setup.py
@@ -36,7 +36,7 @@
       url='https://github.com/deis/deis',
       keywords=[
           'opdemand', 'deis', 'paas', 'cloud', 'chef', 'docker', 'heroku',
-          'aws', 'ec2', 'rackspace', 'digitalocean'
+          'aws', 'ec2', 'rackspace', 'digitalocean', 'gce'
       ],
       classifiers=[
           'Development Status :: 4 - Beta',


Test patch: