Skip to content

Commit

Permalink
Fixes for 0.4.1
Browse files Browse the repository at this point in the history
- Added fix for cluster delete. hitachienergy#612
- Allow for - in clustername. hitachienergy#615
- Fix for double epiphany-cluster definition when running init. hitachienergy#615
- Added warning message for availabiltity_zones not jet supported on Azure.
- Bumped all version numbers to 0.4.1.
  • Loading branch information
seriva committed Oct 17, 2019
1 parent 8acc67b commit d6d3364
Show file tree
Hide file tree
Showing 57 changed files with 213 additions and 206 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG-0.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@

### Fixed


- [#612](https://github.com/epiphany-platform/epiphany/issues/612) - 'epicli delete' - cannot delete a partially built infrastructure
- [#613](https://github.com/epiphany-platform/epiphany/pull/613) - Hotfixes for Ubuntu offline installation in air-gap mode
- [#614](https://github.com/epiphany-platform/epiphany/pull/614) - Fixed RotatingFileHandler permission error (for Docker Toolbox on Windows)
- [#615](https://github.com/epiphany-platform/epiphany/issues/615) - Minor Azure bugs for 0.4.0 release

## [0.4.0] 2019-10-11

Expand Down
4 changes: 3 additions & 1 deletion core/src/epicli/cli/engine/BuildEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def apply(self):

self.process_infrastructure_docs()

save_manifest([*self.input_docs, *self.infrastructure_docs], self.cluster_model.specification.name)

if not (self.skip_infrastructure or self.is_provider_any(self.cluster_model)):
# Generate terraform templates
with TerraformTemplateGenerator(self.cluster_model, self.infrastructure_docs) as template_generator:
Expand Down Expand Up @@ -124,7 +126,7 @@ def dry_run(self):

self.process_configuration_docs()

return [*self.input_docs, *self.configuration_docs]
return [*self.configuration_docs, *self.infrastructure_docs]

@staticmethod
def is_provider_any(cluster_model):
Expand Down
9 changes: 3 additions & 6 deletions core/src/epicli/cli/engine/InitEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,14 @@ def get_full_config(self, config_docs):
cluster_config_path = save_manifest(config_docs, self.name, self.name + '.yml')
args = type('obj', (object,), {'file': cluster_config_path})()
with BuildEngine(args) as build:
config_docs = build.dry_run()

infra_docs = load_all_documents_from_folder(self.provider, 'defaults/infrastructure')
merged_docs = [*config_docs, *infra_docs]
docs = build.dry_run()

# set the provider for all docs
for doc in merged_docs:
for doc in docs:
if 'provider' not in doc.keys():
doc['provider'] = self.provider

return merged_docs
return docs



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ def run(self):
if (len(component_value.subnets) > 1):
self.logger.warning(f'On Azure only one subnet per component is supported for now. Taking first and ignoring others.')

# Add message for ignoring availabiltity zones if present.
if 'availability_zone' in component_value.subnets[0]:
self.logger.warning(f'On Azure availability_zones are not supported jet. Ignoring definition.')

subnet_definition = component_value.subnets[0]
subnet = select_first(infrastructure, lambda item: item.kind == 'infrastructure/subnet' and
item.specification.address_prefix == subnet_definition['address_pool'])
Expand Down
7 changes: 4 additions & 3 deletions core/src/epicli/cli/helpers/naming_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ def storage_account_name(prefix, cluster_name, storage_use):
sto = storage_use.lower()

clu = ''
cn = cluster_name.replace('-', '')
length = 24 - (len(pre)+len(sto))
if len(cluster_name) > length:
clu = cluster_name[:length].lower()
if len(cn) > length:
clu = cn[:length].lower()
else:
clu = cluster_name.lower()
clu = cn.lower()

return f'{pre}{clu}{sto}'

2 changes: 1 addition & 1 deletion core/src/epicli/cli/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '0.4.0'
VERSION = '0.4.1'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: epiphany-cluster
version: 0.4.0
version: 0.4.1
title: "Epiphany cluster Config"
provider: any
name: "default"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: epiphany-cluster
version: 0.4.0
version: 0.4.1
title: "Epiphany cluster Config"
provider: aws
name: "default"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/default-security-group
version: 0.4.0
version: 0.4.1
title: "Default Security Group Config"
provider: aws
name: default-security-group
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/efs-storage
version: 0.4.0
version: 0.4.1
title: "Elastic File System Config"
provider: aws
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/internet-gateway
version: 0.4.0
version: 0.4.1
title: "Internet Gateway Config"
provider: aws
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/launch-configuration
version: 0.4.0
version: 0.4.1
title: "Launch configuration"
provider: aws
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/public-key
version: 0.4.0
version: 0.4.1
title: "Public Key"
provider: aws
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/resource-group
version: 0.4.0
version: 0.4.1
title: "Resource Group"
provider: aws
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/route-table-association
version: 0.4.0
version: 0.4.1
title: Route Table Association Config"
provider: aws
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/route-table
version: 0.4.0
version: 0.4.1
title: "Route Table Config"
provider: aws
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/security-group-rule
version: 0.4.0
version: 0.4.1
title: "Default Group Rule"
provider: aws
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/security-group
version: 0.4.0
version: 0.4.1
title: "Security Group Config"
provider: aws
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/subnet
version: 0.4.0
version: 0.4.1
title: "Subnet Config"
provider: aws
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/virtual-machine
version: 0.4.0
version: 0.4.1
title: "Virtual Machine Infra"
provider: aws
name: default
Expand All @@ -13,7 +13,7 @@ specification:
authorized_to_efs: false
mount_efs: false
tags:
- version: 0.4.0
- version: 0.4.1
size: t2.micro
os_full_name: "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-20190212.1"
os_type: linux
Expand Down Expand Up @@ -84,13 +84,13 @@ specification:

---
kind: infrastructure/virtual-machine
version: 0.4.0
version: 0.4.1
title: "Virtual Machine Infra"
provider: aws
name: default-size-t3
specification:
tags:
- version: 0.4.0
- version: 0.4.1
size: t3.micro
os_type: linux
security:
Expand All @@ -117,13 +117,13 @@ specification:
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
version: 0.4.0
version: 0.4.1
title: "Virtual Machine Infra"
provider: aws
name: rabbitmq-machine
specification:
tags:
- version: 0.4.0
- version: 0.4.1
size: t3.micro
os_type: linux
security:
Expand Down Expand Up @@ -190,13 +190,13 @@ specification:
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
version: 0.4.0
version: 0.4.1
title: "Virtual Machine Infra"
provider: aws
name: load-balancer-machine
specification:
tags:
- version: 0.4.0
- version: 0.4.1
size: t3.micro
os_type: linux
security:
Expand Down Expand Up @@ -243,7 +243,7 @@ specification:
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
version: 0.4.0
version: 0.4.1
title: "Virtual Machine Infra"
provider: aws
name: kubernetes-master-machine
Expand Down Expand Up @@ -343,7 +343,7 @@ specification:
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
version: 0.4.0
version: 0.4.1
title: "Virtual Machine Infra"
provider: aws
name: kubernetes-node-machine
Expand Down Expand Up @@ -421,7 +421,7 @@ specification:
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
version: 0.4.0
version: 0.4.1
title: "Virtual Machine Infra"
provider: aws
name: kafka-machine
Expand Down Expand Up @@ -547,7 +547,7 @@ specification:
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
version: 0.4.0
version: 0.4.1
title: "Virtual Machine Infra"
provider: aws
name: monitoring-machine
Expand Down Expand Up @@ -607,7 +607,7 @@ specification:
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
version: 0.4.0
version: 0.4.1
title: "Virtual Machine Infra"
provider: aws
name: postgresql-machine
Expand Down Expand Up @@ -681,7 +681,7 @@ specification:
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
version: 0.4.0
version: 0.4.1
title: "Virtual Machine Infra"
provider: aws
name: logging-machine
Expand Down
2 changes: 1 addition & 1 deletion core/src/epicli/data/aws/defaults/infrastructure/vpc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/vpc
version: 0.4.0
version: 0.4.1
title: "VPC Config"
provider: aws
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: epiphany-cluster
version: 0.4.0
version: 0.4.1
title: "Epiphany cluster Config"
provider: azure
name: "default"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/network-interface
version: 0.4.0
version: 0.4.1
title: "Network Interface Config"
provider: azure
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/network-security-group
version: 0.4.0
version: 0.4.1
title: "Security Group Config"
provider: azure
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/public-ip
version: 0.4.0
version: 0.4.1
title: "Public IP Config"
provider: azure
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/resource-group
version: 0.4.0
version: 0.4.1
title: "Resource Group"
provider: azure
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/storage-share
version: 0.4.0
version: 0.4.1
title: "Azure shared storage"
provider: azure
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/subnet-network-security-group-association
version: 0.4.0
version: 0.4.1
title: "Subnet Network Security Group Association"
provider: azure
name: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: infrastructure/subnet
version: 0.4.0
version: 0.4.1
title: "Subnet Config"
provider: azure
name: default
Expand Down
Loading

0 comments on commit d6d3364

Please sign in to comment.