Skip to content
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

Native toolset bootstrapping design #131

Merged
merged 10 commits into from
May 11, 2018
Merged

Native toolset bootstrapping design #131

merged 10 commits into from
May 11, 2018

Conversation

chcosta
Copy link
Member

@chcosta chcosta commented Apr 23, 2018

Implementation design for #129

## Native tool installers

The Arcade repo will define the installers for each supported native tool. These installers will be published to Azure blob storage in a versioned location. The native tool installer will define how to install a tool locally (from blob storage). Certain, common install scenarios (xcopy deployable) may use a common library to perform the install.

This comment was marked as spam.

## Blob storage layout

```Text
\nativeassets

This comment was marked as spam.

This comment was marked as spam.

\[version] # semver2 format
\commonlibrary-[version].zip
\commonlibrary-[version].tar
\[tool name]

This comment was marked as spam.

This comment was marked as spam.


### installers

The `installers` folder is the common entry point where the common libraries used to acquire toolsets and the native tool specifc installers are located. The "installers" define how to acquire the corresponding tool (it may use common libraries for some install operations).

This comment was marked as spam.


The `installers` folder is the common entry point where the common libraries used to acquire toolsets and the native tool specifc installers are located. The "installers" define how to acquire the corresponding tool (it may use common libraries for some install operations).

The "installer" is responsible for downloading the native asset and laying it out in the folder specified.

This comment was marked as spam.

This comment was marked as spam.


"Shims" are used to execute the native toolset. Since there is no enforced structure on the file layout for a native asset, shims bridge the gap so that we have a single well-known entry point that can be used for our native toolset. Having shims allows us to put all of them in a single folder (in a given repo) so that we can use them to access the tools rather than managing path access to every known toolset.

It is possible that a native toolset will provide more than one shim.

This comment was marked as spam.

This comment was marked as spam.

-python-3.7.0b3-embed-win32.zip
\installers
\1.0.0-preview1.08530.0+asdf34234
\commonlibrary-1.0.0-preview1.08530.0+asdf34234.zip

This comment was marked as spam.

This comment was marked as spam.


**How do you determine which version of the common libraries / installers to use?**

We'll define the native toolset version in global.json

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.


**How do you determine which native tools to install?**

Implementation detail that is still TBD. Parsable text file would be simplest..

This comment was marked as spam.

This comment was marked as spam.

\commonlibrary-1.0.0-preview1.08530.0+asdf34234.sh
\cmake
\3.10.3
-install-cmake-3.10.3-Windows-x64.ps1

This comment was marked as spam.

This comment was marked as spam.

\[version] # semver2 format
-commonlibrary-[version].zip
-commonlibrary-[version].tar
-install-[tool name]-[tool version].[extension] # installer

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@JohnTortugo
Copy link
Contributor

JohnTortugo commented Apr 30, 2018

I am curious about some points. I don't know if this was discussed before. Sorry, if it was.

  • Do we need to keep .zip and .tar versions of the the same libraries/packages/* ? Will that be specified?

  • Can't we settle on just one scripting language for these automation scripts? That is, instead of having .ps1/.bat and .sh versions of many(all) scripts, can't we just have one .py script? What are the benefits of duplicating these scripts instead of using some other portable scripting language?

  • This is actually a suggestion: I think it might be interesting to have a "latest" file version for the packages/assets/libraries/etc. By that I mean having, for instance, a python-latest-embed-amd64.zip file available, besides "python-3.6.5-embed-amd64.zip, python-3.7.0b3-embed-win32.zip, etc.."; the benefit that I imagine is to let users automatically fetch the latest version of a file without having to change any configuration file.

@chcosta
Copy link
Member Author

chcosta commented Apr 30, 2018

Thanks for the feedback @JohnTortugo

Do we need to keep .zip and .tar versions of the the same libraries/packages/* ?

I'm not certain I understand exactly what you're asking. zips and tars would be archived as needed per platform distribution.

Can't we settle on just one scripting language for these automation scripts?

Is Python inbox on every supported platform? If not, it becomes a native toolset bootstrapping problem and you would need Python to bootstrap Python.

I think it might be interesting to have a "latest" file version

I've considered that, but I couldn't come up with a scenario where that was actually useful. Do you have a concrete scenario? In general I'd expect that repo's want to be explicit about their dependencies.

@alexperovich
Copy link
Member

Is Python inbox on every supported platform? If not, it becomes a native toolset bootstrapping problem and you would need Python to bootstrap Python.

Any helix client will have python 2.7 on it. With VSTS "bring your own cloud" that would mean that any build agent running in helix would have python also. That just leaves the local dev scenario.

If a specific distro doesn't have python on it then we would have to build binaries from source, but helix would have this issue also.

@JohnTortugo
Copy link
Contributor

Is Python inbox on every supported platform?

I don't think so. I was thinking that having only install-python.ps1 and install-python.sh would be better than duplicating all scripts. By the way, Python was just an example, I am just curious which other options were considered.

Do you have a concrete scenario?

I don't have an specific case in mind, but I think anyone interested in just using the latest version of an library/tool should be able to. That also doesn't sound like a seldom thing.

@chcosta
Copy link
Member Author

chcosta commented Apr 30, 2018

I was thinking that having only install-python.ps1 and install-python.sh would be better than duplicating all scripts.

I don't entirely disagree.

The other primary option that was considered was Powershell Core, but that option doesn't work on every platform.

@weshaggard
Copy link
Member

This has been discussed many times (one example #71) and it always boils down to we need to depend on something that is on the system and doesn't require bootstrapping and the goal is to minimize the amount of code we write in a scripting language and get into our build engine as fast as possible.

@weshaggard
Copy link
Member

This is actually a suggestion: I think it might be interesting to have a "latest" file version for the packages/assets/libraries/et

While that might seem nice for some scenarios I think we should try to avoid it as long as possible because it only leads to difficulties. Depending on the latest version of something means we don't have deterministic builds over time which leads to various issues, particularly on the reliability front.


Entry-point scripts are:

- nativetoolsbootstrap.cmd

This comment was marked as spam.

## Blob storage layout

```Text
\nativeassets

This comment was marked as spam.

@tmat
Copy link
Member

tmat commented May 9, 2018

👍


```Text
\native-assets
-cmake-3.10.3-win32-x86.zip

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@chcosta chcosta merged commit bf98041 into dotnet:master May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants