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

Work on upgrade #696

Merged
merged 16 commits into from
Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion CHANGELOG-0.4.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Changelog 0.4

## [0.4.1] 2019-10-17
## [0.4.2] 2019-11-TOCHANGE

### Added

- Offline upgrade for K8n and Docker

### Fixed

- [#612](https://github.com/epiphany-platform/epiphany/issues/694) - epicli apply does not remove from build files removed from sources

## [0.4.1] 2019-10-17

### 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
Expand Down
7 changes: 5 additions & 2 deletions core/src/epicli/cli/engine/ansible/AnsibleRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ def playbook_path(self, name):
def copy_resources(self):
self.logger.info('Copying Ansible resources')
if self.cluster_model != None:
copy_files_recursively(AnsibleRunner.ANSIBLE_PLAYBOOKS_PATH, get_ansible_path(self.cluster_model.specification.name))
ansible_dir = get_ansible_path(self.cluster_model.specification.name)
else:
copy_files_recursively(AnsibleRunner.ANSIBLE_PLAYBOOKS_PATH, get_ansible_path_for_build(self.build_dir))
ansible_dir = get_ansible_path_for_build(self.build_dir)

shutil.rmtree(ansible_dir, ignore_errors=True)
copy_files_recursively(AnsibleRunner.ANSIBLE_PLAYBOOKS_PATH, ansible_dir)

# copy skopeo so Ansible can move it to the repositry machine
if not Config().offline_requirements:
Expand Down
3 changes: 3 additions & 0 deletions core/src/epicli/cli/helpers/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ def offline_requirements(self):
@offline_requirements.setter
def offline_requirements(self, offline_requirements):
if not offline_requirements is None:
if not os.path.isdir(offline_requirements):
raise Exception(f'offline_requirements path "{offline_requirements}" is not a valid path.')

# To make sure Ansible copies the content of the folder the the repository host.
if not offline_requirements.endswith('/'):
offline_requirements = f'{offline_requirements}/'
Expand Down
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.1'
VERSION = '0.4.2'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: epiphany-cluster
version: 0.4.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
- version: 0.4.2
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.1
version: 0.4.2
title: "Virtual Machine Infra"
provider: aws
name: default-size-t3
specification:
tags:
- version: 0.4.1
- version: 0.4.2
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.1
version: 0.4.2
title: "Virtual Machine Infra"
provider: aws
name: rabbitmq-machine
specification:
tags:
- version: 0.4.1
- version: 0.4.2
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.1
version: 0.4.2
title: "Virtual Machine Infra"
provider: aws
name: load-balancer-machine
specification:
tags:
- version: 0.4.1
- version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
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.1
version: 0.4.2
title: "Subnet Config"
provider: azure
name: default
Expand Down
Loading