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

Slims down upgrade testing logic #5960

Merged
merged 1 commit into from
Jun 7, 2021
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
25 changes: 3 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -232,34 +232,15 @@ docker-vnc: ## Open a VNC connection to a running Docker instance.
@echo

.PHONY: upgrade-start
upgrade-start: ## Boot an upgrade test environment using libvirt.
upgrade-start: ## Create a local apt server for testing upgrades in VMs
@echo "███ Starting upgrade test environment..."
@SD_UPGRADE_BASE=$(STABLE_VER) molecule converge -s upgrade
@echo

.PHONY: upgrade-start-qa
upgrade-start-qa: ## Boot an upgrade test env using libvirt in remote apt mode.
@echo "███ Starting upgrade test environment for remote apt..."
@SD_UPGRADE_BASE=$(STABLE_VER) QA_APTTEST=yes molecule converge -s upgrade
molecule converge -s upgrade
@echo

.PHONY: upgrade-destroy
upgrade-destroy: ## Destroy an upgrade test environment.
@echo "███ Destroying upgrade test environment..."
@SD_UPGRADE_BASE=$(STABLE_VER) molecule destroy -s upgrade
@echo

.PHONY: upgrade-test-local
upgrade-test-local: ## Upgrade a running test environment with local apt packages.
@echo "Testing upgrade with local apt packages..."
@molecule side-effect -s upgrade
@echo

.PHONY: upgrade-test-qa
upgrade-test-qa: ## Upgrade a running test environment with apt packages from the QA repo.
@echo "Testing upgrade with packages from QA apt repo..."
@QA_APTTEST=yes molecule converge -s upgrade -- --diff -t apt
@QA_APTTEST=yes molecule side-effect -s upgrade
molecule destroy -s upgrade
@echo

##############
Expand Down
122 changes: 0 additions & 122 deletions Vagrantfile

This file was deleted.

10 changes: 5 additions & 5 deletions install_files/ansible-base/securedrop-apt-local.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
# Playbook to update SecureDrop VMs to install Focal packages from a local repo
# Playbook to update SecureDrop VMs to via local repo
#
# Steps to use this playbook:
#
# 1. On host machine, build packages with `make build-debs-focal`
# 2. On host machine, provision local apt repo with `vagrant up apt-local`
# 1. On host machine, build packages with `make build-debs`
# 2. On host machine, provision local apt repo with `make upgrade-start`
# 3. Switch to Admin Workstation
# 3. Continue with prod provisioning as far as `./securedrop-admin sdconfig`
# 3. Continue with prod provisioning as far as `./securedrop-admin tailsconfig`
# 5. Run `source admin/.venv3/bin/activate` (so ansible commands work)
# 6. Run `cd install_files/ansible-base`
# 7. Run `ansible-playbook -vv --diff securedrop-apt-local.yml`
# 8. Proceed with `./securedrop-admin install`
# 8. Proceed with upgrading packages inside VMs

- name: Configure prod host to prioritize local packages.
environment:
Expand Down
40 changes: 40 additions & 0 deletions molecule/libvirt-prod-focal/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
dependency:
name: galaxy
driver:
name: vagrant
provider:
name: libvirt
platforms:
- name: app-prod
box: bento/ubuntu-20.04
raw_config_args:
- "cpu_mode = 'host-passthrough'"
- "video_type = 'virtio'"
instance_raw_config_args:
- "vm.synced_folder './', '/vagrant', disabled: true"
- "vm.network 'private_network', ip: '10.0.1.4'"
- "ssh.insert_key = false"
memory: 1024
private_ip: 10.0.1.4
groups:
- securedrop_application_server
- securedrop

- name: mon-prod
box: bento/ubuntu-20.04
raw_config_args:
- "cpu_mode = 'host-passthrough'"
- "video_type = 'virtio'"
instance_raw_config_args:
- "vm.synced_folder './', '/vagrant', disabled: true"
- "vm.network 'private_network', ip: '10.0.1.5'"
- "ssh.insert_key = false"
memory: 1024
private_ip: 10.0.1.5
groups:
- securedrop_monitor_server
- securedrop

scenario:
name: libvirt-prod-focal
45 changes: 0 additions & 45 deletions molecule/shared/sd_clone.yml

This file was deleted.

32 changes: 0 additions & 32 deletions molecule/upgrade/ansible-override-vars.yml

This file was deleted.

73 changes: 0 additions & 73 deletions molecule/upgrade/apt.yml

This file was deleted.

Loading