amazon-archives / aws-cfn-resource-bridge Goto Github PK
View Code? Open in Web Editor NEWARCHIVED
License: Apache License 2.0
ARCHIVED
License: Apache License 2.0
Hello,
Trying to build RPM on Amazon Linux 2014.03 fails with a RPM error. See below
[ec2-user@ip-1-1-2-19 ~]$ ls
AMIFinder aws-cfn-resource-bridge
[ec2-user@ip-1-1-2-19 ~]$ cd aws-cfn-resource-bridge/
[ec2-user@ip-1-1-2-19 aws-cfn-resource-bridge]$ sudo python setup.py bdist_rpm
/usr/lib64/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running bdist_rpm
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/rpm
creating build/bdist.linux-x86_64/rpm/SOURCES
creating build/bdist.linux-x86_64/rpm/SPECS
creating build/bdist.linux-x86_64/rpm/BUILD
creating build/bdist.linux-x86_64/rpm/RPMS
creating build/bdist.linux-x86_64/rpm/SRPMS
writing 'build/bdist.linux-x86_64/rpm/SPECS/aws-cfn-resource-bridge.spec'
running sdist
warning: sdist: missing meta-data: if 'author' supplied, 'author_email' must be supplied too
warning: sdist: standard file not found: should have one of README, README.txt
reading manifest template 'MANIFEST.in'
writing manifest file 'MANIFEST'
creating aws-cfn-resource-bridge-0.1
creating aws-cfn-resource-bridge-0.1/aws
creating aws-cfn-resource-bridge-0.1/aws/cfn
creating aws-cfn-resource-bridge-0.1/aws/cfn/bridge
creating aws-cfn-resource-bridge-0.1/bin
creating aws-cfn-resource-bridge-0.1/init
making hard links in aws-cfn-resource-bridge-0.1...
hard linking LICENSE -> aws-cfn-resource-bridge-0.1
hard linking MANIFEST.in -> aws-cfn-resource-bridge-0.1
hard linking NOTICE.txt -> aws-cfn-resource-bridge-0.1
hard linking README.md -> aws-cfn-resource-bridge-0.1
hard linking setup.py -> aws-cfn-resource-bridge-0.1
hard linking aws/__init__.py -> aws-cfn-resource-bridge-0.1/aws
hard linking aws/cfn/__init__.py -> aws-cfn-resource-bridge-0.1/aws/cfn
hard linking aws/cfn/bridge/__init__.py -> aws-cfn-resource-bridge-0.1/aws/cfn/bridge
hard linking aws/cfn/bridge/config.py -> aws-cfn-resource-bridge-0.1/aws/cfn/bridge
hard linking aws/cfn/bridge/processes.py -> aws-cfn-resource-bridge-0.1/aws/cfn/bridge
hard linking aws/cfn/bridge/resources.py -> aws-cfn-resource-bridge-0.1/aws/cfn/bridge
hard linking aws/cfn/bridge/runner.py -> aws-cfn-resource-bridge-0.1/aws/cfn/bridge
hard linking aws/cfn/bridge/util.py -> aws-cfn-resource-bridge-0.1/aws/cfn/bridge
hard linking bin/cfn-resource-bridge -> aws-cfn-resource-bridge-0.1/bin
hard linking init/cfn-resource-bridge -> aws-cfn-resource-bridge-0.1/init
creating dist
tar -cf dist/aws-cfn-resource-bridge-0.1.tar aws-cfn-resource-bridge-0.1
gzip -f9 dist/aws-cfn-resource-bridge-0.1.tar
tar -cf dist/aws-cfn-resource-bridge-0.1.tar aws-cfn-resource-bridge-0.1
gzip -f9 dist/aws-cfn-resource-bridge-0.1.tar
removing 'aws-cfn-resource-bridge-0.1' (and everything under it)
copying dist/aws-cfn-resource-bridge-0.1.tar.gz -> build/bdist.linux-x86_64/rpm/SOURCES
building RPMs
rpm: build/bdist.linux-x86_64/rpm/SPECS/aws-cfn-resource-bridge.spec: No such file or directory
error: Failed to execute: "rpm -q --qf '%{name}-%{version}-%{release}.src.rpm %{arch}/%{name}-%{version}-%{release}.%{arch}.rpm\\n' --specfile 'build/bdist.linux-x86_64/rpm/SPECS/aws-cfn-resource-bridge.spec'"
I am attempting to test out the CF example template to use some cfn-init and cfn-signal commands to handle mounting and unmounting volumes within cloudformation.
I have an rpm command to install the cfn-resource-bridge rpm in my cloudformation template. The install of the code works, but when the service attempts to start I get the below error.
I have installed the prereqs for this code. It appears that this new package is not in the OS's default library path. I'm not a python export so not sure how to fix this within my cloudformation templae.
This is the output in /var/log/cfn-init.log
2016-05-27 15:36:43,918 [DEBUG] Service output: Starting cfn-resource-bridge: Traceback (most recent call last):
File "/opt/aws/bin/cfn-resource-bridge", line 18, in <module>
from aws.cfn import bridge
ImportError: No module named aws.cfn
[FAILED]^M
2016-05-27 15:36:43,918 [ERROR] Error encountered during build of config2: Could not start cfn-resource-bridge
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 517, in run_config
CloudFormationCarpenter(config, self._auth_config).build(worklog)
File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 258, in build
CloudFormationCarpenter._serviceTools[manager]().apply(services, changes)
File "/usr/lib/python2.7/dist-packages/cfnbootstrap/service_tools.py", line 167, in apply
self._start_service(service)
File "/usr/lib/python2.7/dist-packages/cfnbootstrap/service_tools.py", line 198, in _start_service
raise ToolError("Could not start %s" % service)
ToolError: Could not start cfn-resource-bridge
2016-05-27 15:36:44,017 [ERROR] -----------------------BUILD FAILED!------------------------
2016-05-27 15:36:44,020 [ERROR] Unhandled exception during build: Could not start cfn-resource-bridge
Traceback (most recent call last):
File "/opt/aws/bin/cfn-init", line 171, in <module>
worklog.build(metadata, configSets)
File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 118, in build
Contractor(metadata).build(configSets, self)
File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 505, in build
self.run_config(config, worklog)
File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 517, in run_config
CloudFormationCarpenter(config, self._auth_config).build(worklog)
File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 258, in build
CloudFormationCarpenter._serviceTools[manager]().apply(services, changes)
File "/usr/lib/python2.7/dist-packages/cfnbootstrap/service_tools.py", line 167, in apply
self._start_service(service)
File "/usr/lib/python2.7/dist-packages/cfnbootstrap/service_tools.py", line 198, in _start_service
raise ToolError("Could not start %s" % service)
ToolError: Could not start cfn-resource-bridge
/etc/init.d/cfn-resource-bridge start
also outputs the same error.
Thanks in advance for any help on this.
-Chris
This is trivial these days.
cfn-resource-bridge was written a while ago (2013?) and was apparently using botocore 0.66 or maybe 0.77. Well, today we are using botocore 1.50+. As a result, we are hitting deprecation warnings and core that is out right deprecated.
Example:
http://botocore.readthedocs.io/en/latest/client_upgrades.html
After installing the older version, I am hitting other issues, etc...
So is cfn-resource-bridge the right approach to use today 2017?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.