Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebased Version of Director blobstores for swift #521

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -37,7 +37,7 @@ networks:
type: dynamic
cloud_properties:
security_groups:
- default # CHANGE: Security Group
- bosh # CHANGE: Security Group

resource_pools:
- name: medium
Expand Down Expand Up @@ -145,4 +145,4 @@ properties:
tenant: tenant # CHANGE: OpenStack Tenant
region: # CHANGE: OpenStack Region (optional)
default_key_name: bosh-key-name # CHANGE: AWS EC2 default Keyname to use when spinning up new VMs
default_security_groups: ["default"] # CHANGE: AWS EC2 default Security Groups to use when spinning up new VMs
default_security_groups: ["bosh"] # CHANGE: AWS EC2 default Security Groups to use when spinning up new VMs
149 changes: 149 additions & 0 deletions release/examples/bosh-openstack-solo-swift-blobstore.yml
@@ -0,0 +1,149 @@
# Change the following below:
# CHANGE: Director UUID
# CHANGE: Elastic IP 1
# CHANGE: microBOSH IP address
# CHANGE: OpenStack Auth URL
# CHANGE: OpenStack Username
# CHANGE: OpenStack Password
# CHANGE: OpenStack Tenant
# CHANGE: OpenStack Region (optional)
---
name: bosh
director_uuid: 317b3faa-1cf1-4d67-9011-3ef37dde79e8 # CHANGE: Director UUID

release:
name: bosh
version: latest

compilation:
workers: 3
network: default
reuse_compilation_vms: true
cloud_properties:
instance_type: m1.small

update:
canaries: 1
canary_watch_time: 3000-120000
update_watch_time: 3000-120000
max_in_flight: 4
max_errors: 1

networks:
- name: elastic
type: vip
cloud_properties: {}
- name: default
type: dynamic
cloud_properties:
security_groups:
- bosh # CHANGE: Security Group

resource_pools:
- name: medium
network: default
size: 1
stemcell:
name: bosh-openstack-kvm-ubuntu
version: latest
cloud_properties:
instance_type: m1.medium

jobs:
- name: core
template:
- powerdns
- nats
- postgres
- redis
- director
- registry
- health_monitor
instances: 1
resource_pool: medium
networks:
- name: default
default: [dns, gateway]
- name: elastic
static_ips:
- 54.241.11.212 # CHANGE: Elastic IP 1

properties:
env:

postgres: &bosh_db
user: postgres
password: postges
host: 127.0.0.1
listen_address: 127.0.0.1
database: bosh

dns:
address: 216.55.141.199 # CHANGE: Elastic IP 1
db: *bosh_db
user: powerdns
password: powerdns
database:
name: powerdns
webserver:
password: powerdns
replication:
basic_auth: replication:zxKDUBeCfKYXk
user: replication
password: powerdns
recursor: 216.55.141.200 # CHANGE: microBOSH IP address

nats:
address: 127.0.0.1
user: nats
password: nats

redis:
address: 127.0.0.1
password: redis

director:
name: bosh
address: 127.0.0.1
db: *bosh_db

blobstore:
provider: swift
swift_container_name: bosh
swift_provider: openstack
openstack:
openstack_auth_url: http://192.168.1.1:5000/v2.0 # CHANGE: OpenStack Auth URL
openstack_username: username # CHANGE: OpenStack Username
openstack_api_key: password # CHANGE: OpenStack Password
openstack_tenant: tenant # CHANGE: OpenStack Tenant
region: # CHANGE: OpenStack Region (optional)

registry:
address: 127.0.0.1
db: *bosh_db
http:
port: 25777
user: registry
password: registry

hm:
http:
user: hm
password: hm
director_account:
user: admin
password: admin
event_nats_enabled: false
email_notifications: false
tsdb_enabled: false
pagerduty_enabled: false
varz_enabled: true

openstack:
auth_url: http://192.168.1.1:5000/v2.0 # CHANGE: OpenStack Auth URL
username: username # CHANGE: OpenStack Username
api_key: password # CHANGE: OpenStack Password
tenant: tenant # CHANGE: OpenStack Tenant
region: # CHANGE: OpenStack Region (optional)
default_key_name: bosh-key-name # CHANGE: AWS EC2 default Keyname to use when spinning up new VMs
default_security_groups: ["bosh"] # CHANGE: AWS EC2 default Security Groups to use when spinning up new VMs
23 changes: 23 additions & 0 deletions release/jobs/director/spec
Expand Up @@ -161,6 +161,29 @@ properties:
description: AWS secret_access_key used by s3 blobstore plugin
blobstore.address:
description: Addess of blobstore server used by simple blobstore plugin
blobstore.swift_container_name:
description: Container Name used by swift blobstore plugin
blobstore.swift_provider:
description: Specific provider used by swift blobstore plugin (openstack, hp, rackspace)
default: openstack
blobstore.openstack.openstack_auth_url:
description: OpenStack Auth URL used by swift blobstore plugin
blobstore.openstack.openstack_username:
description: OpenStack Username by swift blobstore plugin
blobstore.openstack.openstack_api_key:
description: OpenStack API Key/Password used by swift blobstore plugin
blobstore.openstack.openstack_tenant:
description: OpenStack Tenant used by swift blobstore plugin
blobstore.openstack.openstack_region:
description: OpenStack Region used by swift blobstore plugin
blobstore.hp.hp_access_key:
description: HP Access Key used by swift blobstore plugin
blobstore.hp.hp_secret_key:
description: HP Secret Key used by swift blobstore plugin
blobstore.hp.hp_tenant_id:
description: HP Tenant used by swift blobstore plugin
blobstore.hp.hp_avl_zone:
description: HP Availability Zone used by swift blobstore plugin
blobstore.port:
description: Port of blobstore server used by simple blobstore plugin
default: 25250
Expand Down
44 changes: 43 additions & 1 deletion release/jobs/director/templates/director.yml.erb.erb
Expand Up @@ -16,7 +16,7 @@ logging:
resque:
logging:
level: <%= resque_loglevel %>
<% end %>
<% end %>
redis:
host: <%= p('redis.address') %>
port: <%= p('redis.port') %>
Expand Down Expand Up @@ -87,6 +87,27 @@ blobstore:
<% if_p('blobstore.host') do |host| %>
host: <%= host %>
<% end %>
<% elsif p('blobstore.provider') == 'swift' %>
swift_provider: <%= swift_provider = p('blobstore.swift_provider') %>
container_name: "<%= p('blobstore.swift_container_name') %>"
<% if swift_provider == 'openstack' %>
openstack:
openstack_auth_url: <%= p('blobstore.openstack.openstack_auth_url') %>
openstack_username: "<%= p('blobstore.openstack.openstack_username') %>"
openstack_api_key: "<%= p('blobstore.openstack.openstack_api_key') %>"
openstack_tenant: <%= p('blobstore.openstack.openstack_tenant') %>
<% if_p('blobstore.openstack.openstack_region') do |openstack_region| %>
openstack_region: <%= openstack_region %>
<% end %>
<% elsif swift_provider == 'hp' %>
hp:
hp_access_key: <%= p('blobstore.hp.hp_access_key') %>
hp_secret_key: <%= p('blobstore.hp.hp_secret_key') %>
hp_tenant_id: <%= p('blobstore.hp.hp_tenant_id') %>
hp_avl_zone: <%= p('blobstore.hp.hp_avl_zone') %>
<% else %>
<% raise "blobstore.swift_provider '#{swift_provider}' not supported; available: openstack or hp" %>
<% end %>
<% else %>
endpoint: http://<%= p('blobstore.address') %>:<%= p('blobstore.port') %>
user: <%= p('blobstore.director.user') %>
Expand Down Expand Up @@ -288,6 +309,27 @@ cloud:
<% if_p('blobstore.host') do |port| %>
host: <%= p('blobstore.host') %>
<% end %>
<% elsif p('blobstore.provider') == 'swift' %>
swift_provider: <%= swift_provider = p('blobstore.swift_provider') %>
container_name: "<%= p('blobstore.swift_container_name') %>"
<% if swift_provider == 'openstack' %>
openstack:
openstack_auth_url: <%= p('blobstore.openstack.openstack_auth_url') %>
openstack_username: "<%= p('blobstore.openstack.openstack_username') %>"
openstack_api_key: "<%= p('blobstore.openstack.openstack_api_key') %>"
openstack_tenant: <%= p('blobstore.openstack.openstack_tenant') %>
<% if_p('blobstore.openstack.openstack_region') do |openstack_region| %>
openstack_region: <%= openstack_region %>
<% end %>
<% elsif swift_provider == 'hp' %>
hp:
hp_access_key: <%= p('blobstore.hp.hp_access_key') %>
hp_secret_key: <%= p('blobstore.hp.hp_secret_key') %>
hp_tenant_id: <%= p('blobstore.hp.hp_tenant_id') %>
hp_avl_zone: <%= p('blobstore.hp.hp_avl_zone') %>
<% else %>
<% raise "blobstore.swift_provider '#{swift_provider}' not supported; available: openstack or hp" %>
<% end %>
<% else %>
endpoint: 'http://<%= p(['agent.blobstore.address', 'blobstore.address']) %>:<%= p('blobstore.port') %>'
user: <%= p('blobstore.agent.user') %>
Expand Down