This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'chefspec' | |
| describe 'java::default' do | |
| let (:chef_run) { ChefSpec::ChefRunner.new.converge('java::default') } | |
| it 'should include the openjdk recipe by default' do | |
| chef_run.should include_recipe 'java::openjdk' | |
| end | |
| context 'windows' do | |
| let(:chef_run) do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [berkshefl] $ berks upload | |
| Using apache2 (1.6.0) | |
| Using java (1.10.0) | |
| Using yum (2.1.0) | |
| Using s3cmd (0.0.0) at path: 'site-cookbooks/s3cmd' | |
| Using as_app (0.0.3) at path: 'site-cookbooks/as_app' | |
| Using rabbitmq (0.0.0) at path: 'site-cookbooks/rabbitmq' | |
| Using solr (0.0.0) at path: 'site-cookbooks/solr' | |
| Using windows (1.8.4) | |
| Using chef_handler (1.1.4) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In [1]: policy = """{ | |
| ...: "Statement":[{ | |
| ...: "Effect":"Allow", | |
| ...: "Action":["s3:*"], | |
| ...: "Resource":["arn:aws:s3:::mybucket"]}]}""" | |
| In [2]: import boto | |
| In [4]: c = boto.connect_iam() | |
| In [5]: instance_profile = c.create_instance_profile('myinstanceprofile') | |
| In [6]: role = c.create_role('myrole') | |
| In [7]: c.add_role_to_instance_profile('myinstanceprofile', 'myrole') |