Details

    • Type: New Feature
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      deployS3 role was migrated to a new role named appstore_s3 as part of IGBF-2342.

      However, it has not been tested.

      For this task, modify role appstore_s3 as required to ensure that the S3 bucket is created.

      In addition, create a role that will allow the AppStore VM to modify the newly created S3 bucket. Assign the role to the VM.

      The role should have name ec2_name

        Attachments

          Activity

          ann.loraine Ann Loraine created issue -
          ann.loraine Ann Loraine made changes -
          Field Original Value New Value
          Epic Link IGBF-2323 [ 18477 ]
          ann.loraine Ann Loraine made changes -
          Rank Ranked higher
          ann.loraine Ann Loraine made changes -
          Assignee Ann Loraine [ aloraine ]
          Hide
          ann.loraine Ann Loraine added a comment -

          If you have time left today, could you work on this one?

          (if yes, move it to In Progress)

          Show
          ann.loraine Ann Loraine added a comment - If you have time left today, could you work on this one? (if yes, move it to In Progress)
          ann.loraine Ann Loraine made changes -
          Assignee Chester Dias [ cdias1 ]
          ann.loraine Ann Loraine made changes -
          Description deployS3 role was migrated to a new role named appstore_s3 as part of IGBF-2342.

          However, it has not been tested.

          For this task, modify role appstore_s3 as required to ensure that the S3 bucket is created.
          deployS3 role was migrated to a new role named appstore_s3 as part of IGBF-2342.

          However, it has not been tested.

          For this task, modify role appstore_s3 as required to ensure that the S3 bucket is created.

          In addition, create a role that will allow the AppStore VM to modify the newly created S3 bucket. Assign the role to the VM.

          The role should have name "ec2_name"
          Hide
          cdias1 Chester Dias (Inactive) added a comment -

          Will pick this on monday.

          Show
          cdias1 Chester Dias (Inactive) added a comment - Will pick this on monday.
          ann.loraine Ann Loraine made changes -
          Sprint Spring 7 : 13 Apr to 24 Apr [ 92 ] Spring 7 : 13 Apr to 24 Apr, Spring 8 : 24 Apr to 8 May [ 92, 93 ]
          ann.loraine Ann Loraine made changes -
          Rank Ranked higher
          cdias1 Chester Dias (Inactive) made changes -
          Status To-Do [ 10305 ] In Progress [ 3 ]
          ann.loraine Ann Loraine made changes -
          Description deployS3 role was migrated to a new role named appstore_s3 as part of IGBF-2342.

          However, it has not been tested.

          For this task, modify role appstore_s3 as required to ensure that the S3 bucket is created.

          In addition, create a role that will allow the AppStore VM to modify the newly created S3 bucket. Assign the role to the VM.

          The role should have name "ec2_name"
          deployS3 role was migrated to a new role named appstore_s3 as part of IGBF-2342.

          However, it has not been tested.

          For this task, modify role appstore_s3 as required to ensure that the S3 bucket is created.

          In addition, create a role that will allow the AppStore VM to modify the newly created S3 bucket. Assign the role to the VM.

          The role should have name ec2_name
          Show
          cdias1 Chester Dias (Inactive) added a comment - Code changes have been made. Please review https://bitbucket.org/chesterdias/chester-local-appstore-playbooks/branch/IGBF-2346#diff
          cdias1 Chester Dias (Inactive) made changes -
          Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
          cdias1 Chester Dias (Inactive) made changes -
          Assignee Chester Dias [ cdias1 ]
          Hide
          ann.loraine Ann Loraine added a comment -

          This looks good - great first draft!

          I have a couple of refinements to request:

          • Can you modify the role so that it is specific to the S3 bucket that the EC2 will use?

          That is, the permission policy should only apply to the particular bucket that is created in the playbooks. This is to ensure that we can have a very liberal permissions in the role without fear of developers accidentally harming each other's S3 buckets.

          • Also, I would like for the role itself to be named after the EC2 – e.g., the role name should be assigned to {{ ec_name }}.
          Show
          ann.loraine Ann Loraine added a comment - This looks good - great first draft! I have a couple of refinements to request: Can you modify the role so that it is specific to the S3 bucket that the EC2 will use? That is, the permission policy should only apply to the particular bucket that is created in the playbooks. This is to ensure that we can have a very liberal permissions in the role without fear of developers accidentally harming each other's S3 buckets. Also, I would like for the role itself to be named after the EC2 – e.g., the role name should be assigned to {{ ec_name }}.
          Hide
          cdias1 Chester Dias (Inactive) added a comment -

          aws s3 ls
          the above command was used to check if ec2 can list buckets

          Show
          cdias1 Chester Dias (Inactive) added a comment - aws s3 ls the above command was used to check if ec2 can list buckets
          Hide
          ann.loraine Ann Loraine added a comment -

          Chester Dias - Moving back to "To-Do". When you start working on it again, do please move it to "In Progress" to let me know you are working on it.

          Show
          ann.loraine Ann Loraine added a comment - Chester Dias - Moving back to "To-Do". When you start working on it again, do please move it to "In Progress" to let me know you are working on it.
          ann.loraine Ann Loraine made changes -
          Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
          ann.loraine Ann Loraine made changes -
          Status First Level Review in Progress [ 10301 ] To-Do [ 10305 ]
          ann.loraine Ann Loraine made changes -
          Assignee Chester Dias [ cdias1 ]
          Hide
          ann.loraine Ann Loraine added a comment -

          Let's work on the requested new features as part of different ticket. Merged the branch above to master.
          cc: Chester Dias

          Show
          ann.loraine Ann Loraine added a comment - Let's work on the requested new features as part of different ticket. Merged the branch above to master. cc: Chester Dias
          ann.loraine Ann Loraine made changes -
          Status To-Do [ 10305 ] In Progress [ 3 ]
          ann.loraine Ann Loraine made changes -
          Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
          ann.loraine Ann Loraine made changes -
          Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
          ann.loraine Ann Loraine made changes -
          Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
          ann.loraine Ann Loraine made changes -
          Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
          ann.loraine Ann Loraine made changes -
          Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
          ann.loraine Ann Loraine made changes -
          Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
          ann.loraine Ann Loraine made changes -
          Assignee Chester Dias [ cdias1 ]
          Hide
          cdias1 Chester Dias (Inactive) added a comment -

          Sure
          Note: Below is the policy to be added to the role to grant limited priviledges over S3 to the EC2, The below policy will grant list priviledge to list all buckets and all privs over the bucket 'dev-media-****'
          {
          "Version": "2012-10-17",
          "Statement": [

          { "Effect": "Allow", "Action": "s3:ListAllMyBuckets", "Resource": "*" }

          ,

          { "Effect": "Allow", "Action": "s3:*Object", "Resource": [ "arn:aws:s3:::dev-media-****/*" ] }

          ]
          }

          Show
          cdias1 Chester Dias (Inactive) added a comment - Sure Note: Below is the policy to be added to the role to grant limited priviledges over S3 to the EC2, The below policy will grant list priviledge to list all buckets and all privs over the bucket 'dev-media-****' { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:ListAllMyBuckets", "Resource": "*" } , { "Effect": "Allow", "Action": "s3:*Object", "Resource": [ "arn:aws:s3:::dev-media-****/*" ] } ] }
          Hide
          ann.loraine Ann Loraine added a comment -

          Thanks for this.
          Making a note to add this to s3 role and moving back to "to do".

          Show
          ann.loraine Ann Loraine added a comment - Thanks for this. Making a note to add this to s3 role and moving back to "to do".
          ann.loraine Ann Loraine made changes -
          Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
          ann.loraine Ann Loraine made changes -
          Status Post-merge Testing In Progress [ 10003 ] To-Do [ 10305 ]
          cdias1 Chester Dias (Inactive) made changes -
          Assignee Chester Dias [ cdias1 ]
          cdias1 Chester Dias (Inactive) made changes -
          Status To-Do [ 10305 ] In Progress [ 3 ]
          Hide
          cdias1 Chester Dias (Inactive) added a comment -

          Please review https://bitbucket.org/chesterdias/chester-local-appstore-playbooks/branch/IGBF-2346#diff
          I have added the code for creating a policy dynamically with a name of the EC2 to which it is associated to
          the Policy will grant the Ec2 the access to list all the buckets and full permission over it own bucket and no access to other buckets

          Show
          cdias1 Chester Dias (Inactive) added a comment - Please review https://bitbucket.org/chesterdias/chester-local-appstore-playbooks/branch/IGBF-2346#diff I have added the code for creating a policy dynamically with a name of the EC2 to which it is associated to the Policy will grant the Ec2 the access to list all the buckets and full permission over it own bucket and no access to other buckets
          cdias1 Chester Dias (Inactive) made changes -
          Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
          cdias1 Chester Dias (Inactive) made changes -
          Assignee Chester Dias [ cdias1 ] Ann Loraine [ aloraine ]
          Hide
          ann.loraine Ann Loraine added a comment -

          Change request:

          Show
          ann.loraine Ann Loraine added a comment - Change request: Please avoid coding JSON in the role playbook itself. Use templates instead. (As an example, see: https://bitbucket.org/lorainelab/appstore-playbooks/src/master/Ansible/roles/appstore_s3/templates/policy_json.j2 )
          ann.loraine Ann Loraine made changes -
          Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
          ann.loraine Ann Loraine made changes -
          Status First Level Review in Progress [ 10301 ] To-Do [ 10305 ]
          Hide
          cdias1 Chester Dias (Inactive) added a comment -

          sure will update the same

          Show
          cdias1 Chester Dias (Inactive) added a comment - sure will update the same
          Show
          cdias1 Chester Dias (Inactive) added a comment - Requested Changes are made, Please review https://bitbucket.org/chesterdias/chester-local-appstore-playbooks/branch/IGBF-2346#diff
          cdias1 Chester Dias (Inactive) made changes -
          Status To-Do [ 10305 ] In Progress [ 3 ]
          cdias1 Chester Dias (Inactive) made changes -
          Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
          Hide
          ann.loraine Ann Loraine added a comment -

          Change requests - please take a look:

          • Do not make any changes to EC instance as it is not created yet - please note order of role execution in set_up.yml.
          • Accordingly, check role appstore_ec2 to ensure it is created using the new syntax.

          Please note: the master branch version of appstore_s3/tasks/main.yml does not create a stand-alone policy but instead simply modifies a role that is created in the previous task. The proposed changes are an improvement on this because a stand-alone policy is being created, which is a better because this same policy can be separately attached to IAM users, thus allowing them to use the AWS console to make changes to their App Store's bucket.

          • Change "policy_name" in task "Create IAM Managed Policy" to {{ s3_bucket_name }}.
          • Change "name" in task "Create IAM role if not present for Ec2" to {{ s3_bucket_name }}
          • Carefully compare proposed changes to master branch version to ensure existing functionality or assumptions will not be disrupted. If they are, please fix accordingly.
          Show
          ann.loraine Ann Loraine added a comment - Change requests - please take a look: Do not make any changes to EC instance as it is not created yet - please note order of role execution in set_up.yml. Accordingly, check role appstore_ec2 to ensure it is created using the new syntax. Please note: the master branch version of appstore_s3/tasks/main.yml does not create a stand-alone policy but instead simply modifies a role that is created in the previous task. The proposed changes are an improvement on this because a stand-alone policy is being created, which is a better because this same policy can be separately attached to IAM users, thus allowing them to use the AWS console to make changes to their App Store's bucket. Change "policy_name" in task "Create IAM Managed Policy" to {{ s3_bucket_name }}. Change "name" in task "Create IAM role if not present for Ec2" to {{ s3_bucket_name }} Carefully compare proposed changes to master branch version to ensure existing functionality or assumptions will not be disrupted. If they are, please fix accordingly.
          ann.loraine Ann Loraine made changes -
          Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
          ann.loraine Ann Loraine made changes -
          Status First Level Review in Progress [ 10301 ] To-Do [ 10305 ]
          ann.loraine Ann Loraine made changes -
          Assignee Ann Loraine [ aloraine ] Chester Dias [ cdias1 ]
          Hide
          cdias1 Chester Dias (Inactive) added a comment -

          I have checked the order, the proposed change has been added.
          I have moved the for 'granting a role to ec2' to appstore_ec2 since the ec2 won't be created till that execution point.

          Show
          cdias1 Chester Dias (Inactive) added a comment - I have checked the order, the proposed change has been added. I have moved the for 'granting a role to ec2' to appstore_ec2 since the ec2 won't be created till that execution point.
          Show
          cdias1 Chester Dias (Inactive) added a comment - Please review the change: https://bitbucket.org/chesterdias/chester-local-appstore-playbooks/branch/IGBF-2346#diff
          cdias1 Chester Dias (Inactive) made changes -
          Status To-Do [ 10305 ] In Progress [ 3 ]
          cdias1 Chester Dias (Inactive) made changes -
          Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
          cdias1 Chester Dias (Inactive) made changes -
          Assignee Chester Dias [ cdias1 ] Ann Loraine [ aloraine ]
          ann.loraine Ann Loraine made changes -
          Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
          ann.loraine Ann Loraine made changes -
          Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
          ann.loraine Ann Loraine made changes -
          Assignee Ann Loraine [ aloraine ] Chester Dias [ cdias1 ]
          cdias1 Chester Dias (Inactive) made changes -
          Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
          Show
          cdias1 Chester Dias (Inactive) added a comment - PR: https://bitbucket.org/lorainelab/appstore-playbooks/pull-requests/24/igbf-2346/diff
          cdias1 Chester Dias (Inactive) made changes -
          Assignee Chester Dias [ cdias1 ] Ann Loraine [ aloraine ]
          ann.loraine Ann Loraine made changes -
          Sprint Spring 7 : 13 Apr to 24 Apr, Spring 8 : 24 Apr to 8 May [ 92, 93 ] Spring 7 : 13 Apr to 24 Apr, Spring 8 : 24 Apr to 8 May, Spring 8 : 11 May to 25 May [ 92, 93, 94 ]
          ann.loraine Ann Loraine made changes -
          Rank Ranked higher
          ann.loraine Ann Loraine made changes -
          Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
          ann.loraine Ann Loraine made changes -
          Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
          ann.loraine Ann Loraine made changes -
          Assignee Ann Loraine [ aloraine ]
          ann.loraine Ann Loraine made changes -
          Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
          ann.loraine Ann Loraine made changes -
          Resolution Done [ 10000 ]
          Status Post-merge Testing In Progress [ 10003 ] Closed [ 6 ]
          ann.loraine Ann Loraine made changes -
          Assignee Chester Dias [ cdias1 ]

            People

            • Assignee:
              cdias1 Chester Dias (Inactive)
              Reporter:
              ann.loraine Ann Loraine
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: