-
Notifications
You must be signed in to change notification settings - Fork 4
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
Added support for Alibaba cloud platform #93
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Russell Seymour <[email protected]>
…omate and Chef Server packages Added new helper to support this. Updated to handle cloud-init installation properly and configure it for Alibaba machines Signed-off-by: Russell Seymour <[email protected]>
So that the URLs for the products to be downloaded are available to the Added options to modify the installation of |
Added SSH settings for Aliabab in _security.rb recipe so that the root user can sign in Removed Biscotti validation for Alibaba Signed-off-by: Russell Seymour <[email protected]>
@@ -386,6 +391,16 @@ def biscotti_token_hmac | |||
node["chef-marketplace"]["biscotti"]["token"], | |||
node["chef-marketplace"]["biscotti"]["uuid"]) | |||
end | |||
|
|||
def download_url(product) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In principal I like this idea assuming we're forced to put the packages in their cloud because of firewall issues. I think that we need to formarlize and unify our approach in this and the image generation.
- Both the upgrade and marketplace_image install should use the same mechanism for determining available package versions.
- Perhaps we should have a
latest
version that points to the latest version for each software package. - Docs and/or code to upload packages and modify that config file should be present.
Alternatively, have we considered mirroring the repos in Alibaba?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a speed issue when downloading packages hence the reason for using their storage service.
For example when I did this manually it would take almost all day to download the marketplace image!
I agree with the same method for all scenarios - just trying to get it to work in the first place ;-)
The easiest approach would be to mirror into the Alibaba repos. This would keep everything as is for other cloud platforms - just need to take out the specifics for Alibaba that I have put in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not mean the main Ubuntu repos, it would be good if we could get a packages
repo in China.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@schisamo, fyi about downloads from packages.chef.io
in China.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yzl There should be no technical restriction on mirroring packages.chef.io data in China, it is not on our embargoed country list:
https://github.com/chef/es-package-router/blob/05f8910a7a77904e02b4ad40e7b493c717c3ce4f/.delivery/build-cookbook/recipes/_fastly.rb#L3-L9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@schisamo @ryancragun @yzl Interesting.
I am not sure what the issue is then, but there is very definite throttling going on when trying to get a package from packages.chef.io
. It is so slow that it more often than not times out.
I am hoping to get some contact details for Alibaba as there is another issue I have with the approval of the image which has been rejected. (The error states that we running Windows Update will fix it!!!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read about this a bit, and the possibilities that come to my mind are:
- The package isn't cached at whatever fastly POP is closest to Alibaba so they're actually downloading from the origin in the US,
- The package is cached locally, but we need some support from fastly, e.g. https://community.fastly.com/t/fastly-cdn-content-blocked-by-the-great-firewall-of-china/447
- The package is cached locally and fastly is set up for our particular use case, and something else is going on.
clout-init is not installed when running on Alibaba Added logging to the chef-marketplace preconfigure script Signed-off-by: Russell Seymour <[email protected]>
Marketplace image is now working after rolling back the I have added some simple logging to the preconfigure script for marketplace |
Signed-off-by: Russell Seymour <[email protected]>
Updated the chef-marketplace cookbook to support the creation of marketplace images on the Alibaba Cloud Platform.
In order to support this the Automate and Chef-Server packages have been uploaded to the Object Storage Server (OSS) which is the Alibaba equivalent to AWS S3. This has been done because pulling packages from the
packages.chef.io
is so slow that the operation times out.To get this working I have hardcoded the
product_urls
into the default attributes file because I could not work out how to pass additional configuration from Packer in themarketplace-image
as attributes to this cookbook. Is it because they are nested because theplatform
comes through ok?Then to install the packages I have added a remote_file resource to the
_upgrade_automate.rb
and_update_chef_server.rb
that only triggers when the platform is "Alibaba" so that the DEB file is downloaded from OSS. The subsequentchfe-ingredient
resource then has thepackage_source
attribute set if the platform is "Alibaba".A small modification was required to the
_config_biscotti.rb
file so that it did not try to return a table of instances using theec2
attribute. Perhaps this should not be the default?This has been done in conjunction with modifications to the
marketplace_image
cookbook.Signed-off-by: Russell Seymour [email protected]