-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fog (using foreman) integration to GCE #158
Comments
So it looks like you're using the old version of fog-google (https://github.com/theforeman/foreman/blob/27ae0a7da15b3b26e85645c4773d15ac3d4d5157/bundler.d/fog.rb). Could you try requiring fog-google (and fog-aws, you don't actually want to require normal fog unless you need 1.9 support), because I most of these issues have been fixed in more recent issues. |
cc @Temikus |
@DaveTaboola Did updating to recent fog-google help? |
No response. Feel free to reopen! |
Hi, right now we are using foreman 1.14, and it's using fog-google-0.1.0 and google-api-client-0.8.2-5. |
created an issue about that, if you can relate please. |
@shahaf600 what you're describing are very old and unsupported versions of fog-google. We only support the most recent release. |
@shahaf600 For what it's worth, XPN support does exist in fog 2.0+ (one can specify a network project when manipulating networks), but it seems it's up to foreman to bump the dep and implement it. If there are any specific questions on implementation, however - let me know and I'll try to help. EDIT: Grammer |
@Temikus ok got it, you are right it's foreman's responsibility, but we want to make a contact with them to support a more progressed release of fog, and I didn't get what you meant by "XPN support does exist in fog 2.0", because there are: fog, fog-core, fog-google. what does foreman need to use so they can manage projects in google cloud ? (what is the the first release that started to support XPN?) |
@shahaf600 Answering very quickly so forgive me for brevity/typos. Sorry, should've been a bit more clear. XPN support exists in I'm not sure what's the minimum version for that but in any case highly recommend using fog-google >1.2 since the older version of google-api-client (which was a dependency) is no longer maintained.
Makes sense? If not - no worries - just let me know and I'll try to come up with a self-contained example :) |
Hey guys
I've been working with Foreman for some while and recently started working on GCE integration (We had EC2 integration for some while and its working properly)
I don't know if you're aware but foreman is using your library to work with various cloud providers
I've found several issues with the current library and GCE specifically
You don't support regions and subnetworks:
Issue: Once a subnet is defined in foreman by default it assumes you have using the Google predefined "default" network and all the configuration comes with it.
As of both VPN and security improvement.
Solution: I had to change lib/fog/google/requests/compute/insert_server.rb file,
Currently I've added hard coded section that looks at the following code:
The hard coded area specifies that we're using the region name (which is specified in the GCE plugin configuration) and subnetwork specified
Issue: As google instances are blocked for root access, and therefor foreman is blocked of running finish script we had to open it at least temporarily, and the best way to do so (while maintaining the base google images, at least the RedHat and CentOS) was adding metadata for the GCE to run a script as the instance comes up.
Solution: I had to add the following def on lib/fog/google/models/compute/server.rb
and obviously call it later on in the code
I think we also need to add support for custom metadata for GCE
I know i'd use it with Foreman but i think it'll be used by others as well
Foreman info:
Site: https://www.theforeman.org/
GitHub repo: https://github.com/theforeman/theforeman.org
Version: 1.12.2 (Latest)
Fog info:
Version: fog-google-0.1.0 library (at least from what I've found in the lib directory)
The text was updated successfully, but these errors were encountered: