Salt-bootstrap: Get salt-bootstrap for windows is not working using wget or curl

Created on 20 Dec 2019  路  11Comments  路  Source: saltstack/salt-bootstrap

How Do I get salt-bootstrap for windows using curl or wget?
When I do
curl -o bootstrap-salt.ps1 -L https://bootstrap.saltstack.com
This dosen't works on windows powershell

Feature Confirmed

All 11 comments

@hemantaltair, that's because bootstrap.saltstack.com does not include a redirect for powershell specifically and only supports bourne shell. To fetch the powershell script with curl, you need to access the bootstrap script from the repository directly (i.e. something like https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.ps1)

But, on that note...

maintainers: is there a present way (or any plans in the future) to support a bootstrap.saltstack.com redirect to the powershell script for bootstrapping on Windows machines? Or are we limited to the github repository directly?

@bryceml could we get redirects for windows setup?

Something like https://bootstrap.saltstack.com/windows?

It'd also be cool (and more flexible) if you could redirect to a specific revision too. That way we can lock our templates to bootstrap saltstack using the version from a particular commit. I'm personally locking to those raw.githubusercontent.com urls that I prior mentioned.

i.e. maybe something like:

Since the host is only used for fetching single application/octet-stream documents, putting an http cache up there too and rewriting the url (instead of using an S3 store) should also vastly improve performance.

This is now supported with
winbootstrap.saltstack.com
winbootstrap.saltstack.com/develop

@bryceml could we get redirects for windows setup?

Something like https://bootstrap.saltstack.com/windows?

@s0undt3ch We support winbootstrap.saltstack.com the same way we do bootstrap.saltstack.com since about 4-6 months ago

https://winbootstrap.saltstack.com/ is stable
https://winbootstrap.saltstack.com/develop is the develop branch
https://bootstrap.saltstack.com/ is stable
https://bootstrap.saltstackcom/develop is the develop branch

Both redirect http to https.

We only tend to sync the develop branches on release so the develop branches might not always point to the same thing as what is currently the HEAD of the develop branch on github, we could eventually get some automation going so that they get synced on every merge into either branch.

Yes, ideally we should rsync on every push(develop) and tag(stable) automatically.

@s0undt3ch would you prefer a cronjob and sync every hour? or a step in the drone job on push? I would think the cronjob would be easier to keep secure. Also, github has a cache that caches for 5 minutes, so if we run drone job within 5 minutes of the merge, there is a chance we pull the old version.

I think that would be good enough.

@s0undt3ch K, that is now an hourly cronjob.

Awesome! Thank You!

Was this page helpful?
0 / 5 - 0 ratings