Skip to content

Commit

Permalink
Merge pull request #79 from sayanchowdhury/feature/configure-bucket-f…
Browse files Browse the repository at this point in the history
…rom-config

services.ec2: Change the bucket name to more related to fedimg
  • Loading branch information
sayanchowdhury committed Apr 11, 2018
2 parents 683272b + 44ac7b8 commit 45a07a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions fedimg-conf.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ volume_size = 7
access_id = "secretaccessID"
secret_key = "supersecretsecretkey"
base_region = 'us-east-1'
bucket_name = 'fedora-s3-bucket-fedimg'
regions = ['ap-northeast-2', 'us-east-2', 'ap-southeast-1', 'ap-southeast-2',
'ap-south-1', 'eu-west-1', 'sa-east-1', 'us-east-1', 'us-west-2',
'us-gov-west-1', 'us-west-1', 'eu-central-1', 'ap-northeast-1']
Expand Down
6 changes: 2 additions & 4 deletions fedimg/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of fedimg.
# Copyright (C) 2014-2017 Red Hat, Inc.
# Copyright (C) 2014-2018 Red Hat, Inc.
#
# fedimg is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -33,15 +33,13 @@
CLEAN_UP_ON_FAILURE = config['general']['clean_up_on_failure']
DELETE_IMAGES_ON_FAILURE = config['general']['delete_images_on_failure']

AWS_UTIL_USER = config.get('aws', {}).get('util_username', {})
AWS_TEST_USER = config.get('aws', {}).get('test_username', {})
AWS_ACCESS_ID = config.get('aws', {}).get('access_id')
AWS_SECRET_KEY = config.get('aws', {}).get('secret_key')
AWS_VOLUME_SIZE = config.get('aws', {}).get('volume_size')
AWS_VOLUME_TYPES = config.get('aws', {}).get('volume_types')
AWS_VOLUME_VIA_S3 = config.get('aws', {}).get('volume_via_s3')
AWS_IAM_PROFILE = config.get('aws', {}).get('iam_profile')
AWS_REGIONS = config.get('aws', {}).get('regions', {})
AWS_ROOT_VOLUME_SIZE = config.get('aws', {}).get('root_volume_size', {})
AWS_BASE_REGION = config.get('aws', {}).get('base_region', {})
AWS_DELETE_RESOURCES = config.get('aws', {}).get('delete_resources', True)
AWS_S3_BUCKET_NAME = config.get('aws', {}).get('bucket_name', 'fedora-s3-bucket-fedimg')
4 changes: 2 additions & 2 deletions fedimg/services/ec2/ec2imguploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import fedimg.messenger

from fedimg.utils import external_run_command, get_item_from_regex
from fedimg.config import AWS_DELETE_RESOURCES
from fedimg.config import AWS_DELETE_RESOURCES, AWS_S3_BUCKET_NAME
from fedimg.services.ec2.ec2base import EC2Base


Expand Down Expand Up @@ -71,7 +71,7 @@ def __init__(self, *args, **kwargs):
'region': None,
'service': 'EC2',
'secret_key': None,
's3_bucket_name': 'Fedora-S3-bucket',
's3_bucket_name': AWS_S3_BUCKET_NAME,
'volume_via_s3': True,
'root_volume_size': 7,
'push_notifications': False,
Expand Down

0 comments on commit 45a07a5

Please sign in to comment.