cloudbase / cloudbase-init

Cross-platform instance initialization
http://openstack.org
Apache License 2.0
414 stars 150 forks source link

Added HiBee Service to Cloudbase-Init #57

Closed BirknerAlex closed 3 years ago

BirknerAlex commented 3 years ago

This pull-requests adds a new provider to Cloudbase-Init.

But before merging it I would love to receive a .msi Download package including my branch to test it on several nodes.

I tried to build my own msi package but I clearly failed, but I even can't find any information how to build the cloudbase-init project (needed Visual Studio version, python version, other needed tools, ...).

I used a Windows 2019 server machine with following tools installed:

But it failed with

Build started 8/10/2020 7:56:58 AM. 1>Project "C:\OpenStack\build\cloudbase-init\cloudbase-init-installer\CloudbaseInitSetup.sln" on node 1 (default targets). 1>ValidateSolutionConfiguration: Building solution configuration "Release|x64". 1>Project "C:\OpenStack\build\cloudbase-init\cloudbase-init-installer\CloudbaseInitSetup.sln" (1) is building "C:\OpenStack\build\cloudbase-init\cloudbase-init-installer\CloudbaseInitSetup\CloudbaseInitSetup.wixproj.metaproj" (2) on node 1 (default targets). 2>Project "C:\OpenStack\build\cloudbase-init\cloudbase-init-installer\CloudbaseInitSetup\CloudbaseInitSetup.wixproj.metaproj" (2) is building "C:\OpenStack\build\cloudbase-init\cloudbase-init-installer\UtilsActions\UtilsActions.vcxproj" (3) on node 1 (default targets). 3>C:\OpenStack\build\cloudbase-init\cloudbase-init-installer\UtilsActions\UtilsActions.vcxproj(26,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. 3>Done Building Project "C:\OpenStack\build\cloudbase-init\cloudbase-init-installer\UtilsActions\UtilsActions.vcxproj" (default targets) -- FAILED. 2>Done Building Project "C:\OpenStack\build\cloudbase-init\cloudbase-init-installer\CloudbaseInitSetup\CloudbaseInitSetup.wixproj.metaproj" (default targets) -- FAILED. 1>Done Building Project "C:\OpenStack\build\cloudbase-init\cloudbase-init-installer\CloudbaseInitSetup.sln" (default targets) -- FAILED.

Build FAILED.

   "C:\OpenStack\build\cloudbase-init\cloudbase-init-installer\CloudbaseInitSetup.sln" (default target) (1) ->
   "C:\OpenStack\build\cloudbase-init\cloudbase-init-installer\CloudbaseInitSetup\CloudbaseInitSetup.wixproj.metaproj" (default target) (2) ->
   "C:\OpenStack\build\cloudbase-init\cloudbase-init-installer\UtilsActions\UtilsActions.vcxproj" (default target) (3) ->
     C:\OpenStack\build\cloudbase-init\cloudbase-init-installer\UtilsActions\UtilsActions.vcxproj(26,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:00.06 MSBuild failed At C:\Users\Administrator\Desktop\cloudbase-init-installer\BuildAutomation\BuildCloudbaseInitSetup.ps1:155 char:26

  • if ($LastExitCode) { throw "MSBuild failed" }
  • 
    + CategoryInfo          : OperationStopped: (MSBuild failed:String) [], RuntimeException
    + FullyQualifiedErrorId : MSBuild failed 

Maybe someone could help me with that or link me to a build documentation for further testing since I am not very familiar with developing software on Windows.

Thank you.

ader1990 commented 3 years ago

Hello,

Thank you for the PR.

Currently, we still use https://review.opendev.org/ for development, while Github is used as a read only mirror and for issue tracking. Cloudbase-init is a project under the OpenStack umbrella, so if you have contributed to one of the OpenStack projects, the workflow is the same - you need an opendev/launchpad account and use git review for the patches.

These are the open patches for cloudbase-init on opendev: https://review.opendev.org/#/q/status:open+project:x/cloudbase-init

As for the building it, we have the installer code here: https://github.com/cloudbase/cloudbase-init-installer You can leverage the Github actions to build the MSI for you with no hassle whatsoever, with a fee installer changes. You can fork my installer repo https://github.com/ader1990/cloudbase-init-installer-1/tree/nocloud_v2_net_support and just change the remote / branch from the file https://github.com/ader1990/cloudbase-init-installer-1/blob/nocloud_v2_net_support/.github/workflows/build_cbsinit.yml#L12 . If you have the Github Actions enabled for that repo, after the change, a zipped installer will be created for the actions run.

On the code itself, can you share more information in the commit message and the docs part: what is HiBee cloud and if you could put a link there to the documentation of that metadata service itself.

BirknerAlex commented 3 years ago

That Gitlab actions config is awesome, I will try it. I close this PR now to move it go opendev.org. I guess I also need to sign a CLA with OpenStack before. I will try to bring up everything tomorrow.

Regarding docs: HiBee isn't public yet, it's a provisioning system which is used by some companies internally, so there are no public docs available at the moment.

I would love to add it to Cloudbase-Init before the docs are available. If that is possible I would create a second PR which adds documentation afterwards, I don't know when docs are publicly available (but they will).