Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

Commit

Permalink
Forces Python3 in all scenarios
Browse files Browse the repository at this point in the history
Removes unused vagrant-based scenarios
  • Loading branch information
Conor Schaefer committed Apr 6, 2020
1 parent 0d27bcd commit 38d80f3
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 253 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ securedrop-rebuild: ## Rebuilds SecureDrop kernels from source tarball.
@ansible-playbook -vv --diff molecule/securedrop-rebuild/playbook.yml \
-i molecule/securedrop-rebuild/.molecule/ansible_inventory.yml

.PHONY: securedrop-core
securedrop-core: ## Builds kernels for SecureDrop servers
molecule converge -s securedrop-docker

.PHONY: securedrop-workstation
securedrop-workstation: ## Builds kernels for SecureDrop Workstation VMs
molecule converge -s workstation

.PHONY: help
help: ## Prints this message and exits.
@printf "Subcommands:\n\n"
Expand Down
2 changes: 2 additions & 0 deletions molecule/ci-minipli/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ provisioner:
name: ansible
lint:
name: ansible-lint
options:
e: "@../ansible-override-vars.yml"
scenario:
name: ci-minipli
test_sequence:
Expand Down
18 changes: 0 additions & 18 deletions molecule/ci-official-stable3/Dockerfile.j2

This file was deleted.

1 change: 1 addition & 0 deletions molecule/ci-official-stable3/Dockerfile.j2
2 changes: 2 additions & 0 deletions molecule/ci-official-stable3/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ provisioner:
name: ansible
lint:
name: ansible-lint
options:
e: "@../ansible-override-vars.yml"
scenario:
name: ci-official-stable3
test_sequence:
Expand Down
9 changes: 3 additions & 6 deletions molecule/ci-skel/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@

FROM {{ item.image }}@{{ (lookup('pipe', 'cat ../container-hashes.yml')|from_yaml)[item.image_hash_lookup] }}

RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python python-devel python2-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum update -y && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper update -y && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; fi
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python3 python3-requests sudo bash ca-certificates && apt-get clean; \
fi


RUN apt-get install -y sudo paxctl
RUN adduser --disabled-password vagrant
RUN usermod -aG sudo vagrant
RUN echo "%sudo ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers

RUN paxctl -cm /usr/bin/python2.7
RUN paxctl -cm /usr/bin/python3


USER vagrant
2 changes: 2 additions & 0 deletions molecule/ci-skel/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ provisioner:
name: ansible
lint:
name: ansible-lint
options:
e: "@../ansible-override-vars.yml"
scenario:
name: ci
test_sequence:
Expand Down
2 changes: 2 additions & 0 deletions molecule/ci-unofficial/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ provisioner:
name: ansible
lint:
name: ansible-lint
options:
e: "@../ansible-override-vars.yml"
scenario:
name: ci-unofficial
test_sequence:
Expand Down
17 changes: 0 additions & 17 deletions molecule/install/INSTALL.rst

This file was deleted.

56 changes: 0 additions & 56 deletions molecule/install/create.yml

This file was deleted.

36 changes: 0 additions & 36 deletions molecule/install/destroy.yml

This file was deleted.

28 changes: 0 additions & 28 deletions molecule/install/molecule.yml

This file was deleted.

26 changes: 0 additions & 26 deletions molecule/install/playbook.yml

This file was deleted.

9 changes: 0 additions & 9 deletions molecule/install/prepare.yml

This file was deleted.

2 changes: 0 additions & 2 deletions molecule/install/requirements.yml

This file was deleted.

14 changes: 0 additions & 14 deletions molecule/install/tests/test_default.py

This file was deleted.

2 changes: 1 addition & 1 deletion molecule/securedrop-docker/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ provisioner:
lint:
name: ansible-lint
options:
e: "@ansible-override-vars.yml"
e: "@../ansible-override-vars.yml"
scenario:
name: securedrop-docker
test_sequence:
Expand Down
33 changes: 0 additions & 33 deletions molecule/securedrop/molecule.yml

This file was deleted.

10 changes: 3 additions & 7 deletions molecule/workstation/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@

FROM {{ item.image }}@{{ (lookup('pipe', 'cat ../container-hashes.yml')|from_yaml)[item.image_hash_lookup] }}

RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python sudo bash ca-certificates libssl-dev libelf-dev && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python python-devel python2-dnf bash libssl-dev libelf-dev&& dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum update -y && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper update -y && zypper install -y python sudo bash python-xml libssl-dev libelf-dev && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates libssl-dev libelf-dev; fi

RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python3 python3-requests sudo bash ca-certificates libssl-dev libelf-dev && apt-get clean; \
fi

RUN apt-get install -y sudo paxctl
RUN adduser --disabled-password vagrant
RUN usermod -aG sudo vagrant

RUN paxctl -cm /usr/bin/python2.7
RUN paxctl -cm /usr/bin/python3

USER vagrant
2 changes: 2 additions & 0 deletions molecule/workstation/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ provisioner:
name: ansible
lint:
name: ansible-lint
options:
e: "@../ansible-override-vars.yml"
scenario:
name: workstation
test_sequence:
Expand Down

0 comments on commit 38d80f3

Please sign in to comment.