install instructions for windows
See original GitHub issueHi,
On your getting started page it has instructions for quick install. It took me quite a while to realise these instructions are for linux and not windows.
I think it would be great if: a) it is clearly marked that those instructions are for linux b) have instuctions for windows.
the following seems to work for me on windows (someone who knows python better may know a nicer way?) :
virtualenv --python=C:\Python27\python.exe custodian
custodian\Scripts\activate
pip install c7n
edit: actually after playing a bit more it turns out that it doesn’t work in windows (at least for me), i get the error when I try to do custodian run -s . policy.yaml
:
2017-10-13 20:54:07,492: custodian.policy:INFO Provisioning policy lambda auto-tag-creator
2017-10-13 20:54:07,788: custodian.output:ERROR Error while executing policy
Traceback (most recent call last):
File "c:\python27\lib\site-packages\c7n\policy.py", line 507, in provision
role=self.policy.options.assume_role)
File "c:\python27\lib\site-packages\c7n\mu.py", line 223, in publish
func, role, s3_uri, qualifier=alias)
File "c:\python27\lib\site-packages\c7n\mu.py", line 335, in _create_or_update
code_ref = {'ZipFile': archive.get_bytes()}
File "c:\python27\lib\site-packages\c7n\mu.py", line 177, in get_bytes
return open(self._temp_archive_file.name, 'rb').read()
IOError: [Errno 13] Permission denied: 'c:\\users\\mfenner\\appdata\\local\\temp\\tmp26lgus'
2017-10-13 20:54:07,789: custodian.commands:ERROR Error while executing policy auto-tag-creator, continuing
Traceback (most recent call last):
File "c:\python27\lib\site-packages\c7n\commands.py", line 216, in run
policy()
File "c:\python27\lib\site-packages\c7n\policy.py", line 712, in __call__
resources = mode.provision()
File "c:\python27\lib\site-packages\c7n\policy.py", line 507, in provision
role=self.policy.options.assume_role)
File "c:\python27\lib\site-packages\c7n\mu.py", line 223, in publish
func, role, s3_uri, qualifier=alias)
File "c:\python27\lib\site-packages\c7n\mu.py", line 335, in _create_or_update
code_ref = {'ZipFile': archive.get_bytes()}
File "c:\python27\lib\site-packages\c7n\mu.py", line 177, in get_bytes
return open(self._temp_archive_file.name, 'rb').read()
IOError: [Errno 13] Permission denied: 'c:\\users\\mfenner\\appdata\\local\\temp\\tmp26lgus'
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
How to Install Windows 10 (with Pictures) - wikiHow
1. Connect a blank USB flash drive or insert a blank writable DVD. You can install Windows 10 by creating a bootable USB...
Read more >Install Windows from a USB Flash Drive | Microsoft Learn
Step 3 - Install Windows to the new PC ... Turn on the PC and press the key that opens the boot-device selection...
Read more >How to Install Windows 10: a Simple Step-by-Step Guide with ...
Install Windows 10: Steps to Follow · 1. Insert the bootable DVD into the optical bay or the USB disk into your computer....
Read more >How to do a clean installation of Windows 10
The installation process of Windows 10 has two main parts, including the setup and out-of-box experience (OOBE). In the setup process, that's ...
Read more >How To Install Windows | The Complete Guide for 2021 - WePC
To be able to start the installation process, you must first set your PC to boot from the flash drive. This will bypass...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI I think this issue is caused by https://github.com/capitalone/cloud-custodian/blob/a6bc23f1a2150a59855cb2a8204b7e155f570b6b/c7n/mu.py#L208
See here: https://docs.python.org/2/library/tempfile.html#tempfile.NamedTemporaryFile
I don’t think a call to open is required, you can just use
with self._temp_archive_file as temp
however this may have other issues. Would you like me to submit a PR for fixing this @kapilt ?It is pretty close, and we’ve had it working in the past, but without ci infrastructure on windows, ensuring that it continues to do so is a bit difficult. afaik the only issue with windows is the tempfile usage on lambda uploads.
given the ease of docker on windows and bash for windows, i would have hoped that would allow for ready usage of custodian as is on windows.