Skip to content

Commit b0d5445

Browse files
committed
Merge branch 'develop'
2 parents 2424b66 + 20fd79f commit b0d5445

File tree

134 files changed

+436
-2573
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+436
-2573
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ INSTALL*.txt
1111
RELEASENOTES.txt
1212
doc/_build
1313
other_stuff/*/*.png
14+
15+
# roles & dependencies
16+
roles/marvel-nccr*

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Changelog
22

3+
## Quantum Mobile v18.06.0
4+
5+
### Software updates
6+
* aiida-core v0.12.0
7+
* aiida-quantumespresso v2.0.1
8+
9+
### Improvements
10+
11+
- Add /scratch directory
12+
- Using shared folders no longer requires sudo
13+
14+
### Build process
15+
16+
- Separate roles into independent repositories
17+
- Roles are installed via ansible-galaxy
18+
- Continuous integration tests for individual roles
19+
320
## Quantum Mobile v18.04.0
421

522
### Software updates

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Quantum Mobile
22

3+
## What is Quantum Mobile
4+
35
*Quantum Mobile* is a Virtual Machine for computational materials science.
46

57
It comes with a collection of software packages for quantum
@@ -16,37 +18,51 @@ all of which are set up and ready to be used through the
1618
[AiiDA](http://www.aiida.net) python framework for automated workflows and
1719
provenance tracking.
1820

21+
You can run Quantum Mobile on your Windows, MacOS or Linux computer using the
22+
[VirtualBox](http://virtualbox.org/) software.
23+
You can also install Quantum Mobile on virtual machines using cloud services
24+
like Amazon Web Services or OpenStack.
25+
26+
![Demo](https://image.ibb.co/n50SdT/quantum_mobile.gif "A brief impression of the Quantum Mobile interface.")
27+
1928
## Download the VM
2029

21-
Please see [releases](https://github.com/marvel-nccr/quantum-mobile/releases) for the latest VM image and installation instructions.
30+
Please see [releases](https://github.com/marvel-nccr/quantum-mobile/releases)
31+
for the latest VM image and installation instructions.
2232

23-
For issues encountered during installation of the VM, see the [FAQ](https://github.com/marvel-nccr/quantum-mobile/wiki/Frequently-Asked-Questions).
33+
For issues encountered during installation of the VM, see the
34+
[FAQ](https://github.com/marvel-nccr/quantum-mobile/wiki/Frequently-Asked-Questions).
2435

2536
## Build it from scratch
2637

2738
You would like to add/remove some components of the VM
2839
and produce your own modified VM image?
2940

30-
This git repository contains all the vagrant and ansible scripts
31-
required to set up the VM from scratch (note: [plan >1h](other_stuff/timings.txt) for this).
41+
This git repository contains all the vagrant and ansible scripts required to
42+
set up the VM from scratch (note: [plan >1h](other_stuff/timings.txt) for
43+
this).
3244

3345
### Prerequisites
3446

3547
- [vagrant](https://www.vagrantup.com/downloads.html) >= 2.0.1
3648
- [virtualbox](https://www.virtualbox.org/wiki/Downloads)
3749
- [python](https://www.python.org/)
38-
- Host OS: Building VM tested only on Unix systems so far (MacOS, Ubuntu). Might work under Windows with a few modifications.
50+
- Host OS: Building VM tested only on Unix systems so far (MacOS, Ubuntu).
51+
Might work under Windows with a few modifications.
3952

4053
### Create Virtual Machine
4154

4255
```
4356
git checkout git@github.com:marvel-nccr/quantum-mobile.git
4457
cd quantum-mobile
4558
pip install -r requirements.txt
59+
ansible-galaxy install -r requirements.yml
4660
vagrant plugin install vagrant-vbguest # optional, improves interface
4761
vagrant up # build vm from scratch (takes some tens of minutes)
4862
```
4963

64+
Note: Due to a bug in the vbguest vagrant plugin, there are some additional steps #60
65+
5066
### Create image
5167
```
5268
# optional: reduce size of VM

Vagrantfile

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Vagrant.configure(2) do |config|
4545
#config.vbguest.no_remote = true
4646

4747
config.vm.box = "bento/ubuntu-16.04"
48+
#config.vm.box = "bento/ubuntu-18.04"
4849
#config.vm.box_version = "== 201801.02.0"
4950
#config.vm.box = "ubuntu/xenial64"
5051
config.vm.boot_timeout = 60
@@ -55,42 +56,20 @@ Vagrant.configure(2) do |config|
5556

5657
# Shared folder
5758
# Unfortunately, VirtualBox only allows to share absolute paths, which cannot
58-
# work across all host OS. Until this changes, let's add the shared folder
59+
# work across all host OS.
5960
# https://www.virtualbox.org/ticket/15305
6061
#config.vm.synced_folder ".", gconfig['vm_shared_folder'], owner: gconfig['vm_user']
6162

6263
# Disable the default shared folder of vagrant
6364
config.vm.synced_folder ".", "/vagrant", disabled: true
6465

65-
# provisioner: python needed for ansible provisioner
66-
config.vm.provision "bootstrap", type: "shell" do |s|
67-
s.inline = "apt-get update && apt-get install -y python2.7 python3"
68-
end
69-
70-
# provisioner: add custom user for ansible provisioner
71-
user = gconfig['vm_user']
72-
password = gconfig['vm_password']
73-
commands = <<-EOF
74-
if [ ! -d /home/#{user} ] ; then
75-
useradd -m -s /bin/bash --groups sudo,adm #{user} && \
76-
cp -pr /home/vagrant/.ssh /home/#{user}/ && \
77-
chown -R #{user}:#{user} /home/#{user} \
78-
# echo #{user}:#{password} | chpasswd
79-
fi
80-
EOF
81-
config.vm.provision "adduser", type: "shell" do |s|
82-
s.inline = commands
83-
end
84-
8566
# provisioner: set up VM via ansible. To (re-)run this step:
8667
# vagrant provision --provision-with ansible
8768
config.vm.provision "ansible" do |ansible|
8869
ansible.verbose = "v"
89-
ansible.inventory_path = './hosts'
9070
ansible.playbook = "playbook.yml"
9171
ansible.extra_vars = {
9272
ansible_python_interpreter: "/usr/bin/python2.7",
93-
ansible_user: user
9473
}
9574
ansible.raw_arguments = Shellwords.shellsplit(ENV['ANSIBLE_ARGS']) if ENV['ANSIBLE_ARGS']
9675
end

ansible.cfg

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,17 @@
22
[defaults]
33
log_path = ./ansible.log
44
inventory = ./hosts
5+
roles_path = ./roles
6+
7+
# workaround for https://github.com/ansible/ansible/issues/14426
8+
timeout = 30
59

610
# Use the YAML callback plugin.
711
stdout_callback = yaml
812
# Use the stdout_callback when running ad-hoc commands.
913
bin_ansible_callbacks = True
14+
15+
# when changing user via su, this opens a login shell
16+
# (i.e. executes .profile)
17+
# See https://askubuntu.com/a/376386/715125
18+
ansible_su_flags = "- "

globalconfig.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
# Caution: This file is read by vagrant, ansible and bash
3-
vm_version: "18.04.0"
3+
vm_version: "18.06.0"
44
vm_name: "Quantum Mobile"
55
vm_description: "A Virtual Machine for Computational Materials Science"
66
vm_url: "https://github.com/marvel-nccr/marvel-virtualmachine"
77
vm_author: "MARVEL NCCR and MaX CoE"
88
vm_author_url: "http://nccr-marvel.ch"
9-
vm_release_notes_file: "{{ ansible_env.HOME }}/Desktop/RELEASENOTES.txt"
9+
vm_release_notes_file: "${HOME}/Desktop/RELEASENOTES.txt"
1010

1111
# VM configuration
1212
vm_hostname: "qmobile"
@@ -16,7 +16,7 @@ vm_memory: 1024
1616
vm_cpus: 2
1717
vm_vram: 128
1818
vm_shared_folder: "/shared"
19-
vm_codes_folder: "{{ ansible_env.HOME }}/codes"
20-
vm_examples_folder: "{{ ansible_env.HOME }}/examples"
19+
vm_codes_folder: "${HOME}/codes"
20+
vm_examples_folder: "${HOME}/examples"
2121
vm_headless: False
2222
vm_browser: chromium # 'chromium' or 'firefox'

host_vars/aws_aiida.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ansible_ssh_common_args: -i ./keys/aiida_tutorial_aiidaaccount -o StrictHostKeyChecking=no
2+
3+
ansible_become_user: root
4+
ansible_become_method: su
5+
ansible_become_pass: "{{ lookup('file', './keys/aws_root_pass') }}"

host_vars/aws_ubuntu.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ansible_ssh_common_args: -i ./keys/aiida-tutorial.pem -o StrictHostKeyChecking=no

hosts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[vms:vars]
2+
ansible_ssh_common_args= -F vagrant-ssh
3+
[vms]
4+
default ansible_user=vagrant

keys/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*

0 commit comments

Comments
 (0)