Skip to content

Commit beced5a

Browse files
committed
Merge pull request #39 from computationalmodelling/FEAT-036
FEAT-036: Link virtual machines to environments
2 parents b4f5022 + 31eda58 commit beced5a

9 files changed

+80
-1
lines changed

guest_resources/welcome/welcome_virtualmicromagnetics-fidimag.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ software for simulation use, specifically:
99
1010
Documented examples are also available on the desktop.
1111

12+
For more information on Virtual Micromagnetics, visit
13+
http://virtualmicromagnetics.org. Information about the environment that
14+
created the base box that this machine is built with, such as the version
15+
number, can be found in this `file
16+
</virtualmicromagnetics_machine_characteristics.txt>`_. Please include this
17+
information when reporting a suspected bug.
18+
1219
This tool is provided by the University of Southampton (Mark Vousden, Max
1320
Albert, Hans Fangohr and others). Neither the University of Southampton nor the
1421
authors assume any responsibility whatsoever for its use by other parties, and

guest_resources/welcome/welcome_virtualmicromagnetics-full.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ Other lower-level tools are installed for convenience, such as paraview, grace,
3636
gnuplot, the IPython (Jupyter) Notebook and more. This machine runs on 64-bit
3737
Ubuntu with Xfce as a desktop environment.
3838

39+
For more information on Virtual Micromagnetics, visit
40+
http://virtualmicromagnetics.org. Information about the environment that
41+
created the base box that this machine is built with, such as the version
42+
number, can be found in this `file
43+
</virtualmicromagnetics_machine_characteristics.txt>`_. Please include this
44+
information when reporting a suspected bug.
45+
3946
These tools are provided by the University of Southampton (Mark Vousden, Max
4047
Albert, Hans Fangohr and others). Neither the University of Southampton nor the
4148
authors assume any responsibility whatsoever for its use by other parties, and

guest_resources/welcome/welcome_virtualmicromagnetics-lite.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ For more information about these packages, see their respective websites and
2323
examples available on the desktop, which walk the user through some examples
2424
and tests where applicable.
2525

26+
For more information on Virtual Micromagnetics, visit
27+
http://virtualmicromagnetics.org. Information about the environment that
28+
created the base box that this machine is built with, such as the version
29+
number, can be found in this `file
30+
</virtualmicromagnetics_machine_characteristics.txt>`_. Please include this
31+
information when reporting a suspected bug.
32+
2633
These tools are provided by the University of Southampton (Mark Vousden, Max
2734
Albert, Hans Fangohr and others). Neither the University of Southampton nor the
2835
authors assume any responsibility whatsoever for its use by other parties, and

guest_resources/welcome/welcome_virtualmicromagnetics-magpar.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ software for simulation use, specifically:
99
1010
Documented examples are also available on the desktop.
1111

12+
For more information on Virtual Micromagnetics, visit
13+
http://virtualmicromagnetics.org. Information about the environment that
14+
created the base box that this machine is built with, such as the version
15+
number, can be found in this `file
16+
</virtualmicromagnetics_machine_characteristics.txt>`_. Please include this
17+
information when reporting a suspected bug.
18+
1219
This tool is provided by the University of Southampton (Mark Vousden, Max
1320
Albert, Hans Fangohr and others). Neither the University of Southampton nor the
1421
authors assume any responsibility whatsoever for its use by other parties, and

guest_resources/welcome/welcome_virtualmicromagnetics-nmag.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ for simulation use, specifically:
99
1010
Documented examples are also available on the desktop.
1111

12+
For more information on Virtual Micromagnetics, visit
13+
http://virtualmicromagnetics.org. Information about the environment that
14+
created the base box that this machine is built with, such as the version
15+
number, can be found in this `file
16+
</virtualmicromagnetics_machine_characteristics.txt>`_. Please include this
17+
information when reporting a suspected bug.
18+
1219
This tool is provided by the University of Southampton (Mark Vousden, Max
1320
Albert, Hans Fangohr and others). Neither the University of Southampton nor the
1421
authors assume any responsibility whatsoever for its use by other parties, and

guest_resources/welcome/welcome_virtualmicromagnetics-oommf.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ software for simulation use, specifically:
99
1010
Documented examples are also available on the desktop.
1111

12+
For more information on Virtual Micromagnetics, visit
13+
http://virtualmicromagnetics.org. Information about the environment that
14+
created the base box that this machine is built with, such as the version
15+
number, can be found in this `file
16+
</virtualmicromagnetics_machine_characteristics.txt>`_. Please include this
17+
information when reporting a suspected bug.
18+
1219
This tool is provided by the University of Southampton (Mark Vousden, Max
1320
Albert, Hans Fangohr and others). Neither the University of Southampton nor the
1421
authors assume any responsibility whatsoever for its use by other parties, and

roles/create_VM/tasks/main.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
- name: Obtain the current tag, (or version if untagged) of this repository.
4949
shell: |
50-
TAG=$(git name-rev --tags --name-only HEAD)
50+
TAG=$(git name-rev --tags --name-only HEAD | cut -f1 -d^)
5151
if [ "$(echo $TAG | tr -d [:space:])" == "undefined" ]; then
5252
git rev-parse --short HEAD
5353
else
@@ -66,6 +66,17 @@
6666
regexp="^[0-9a-zA-Z]*"
6767
line={{ current_version.stdout }}
6868

69+
- name: Obtain build machine information.
70+
shell: |
71+
echo "Build VirtualBox version: $(VBoxManage --version)" > {{ vm_dir }}/build_information
72+
echo "Build Vagrant version: $(vagrant --version)" >> {{ vm_dir }}/build_information
73+
echo "Build hostname: $HOSTNAME" >> {{ vm_dir }}/build_information
74+
echo "Uname output: $(uname -a)" >> {{ vm_dir }}/build_information
75+
echo "lsb_release output: $(lsb_release -a)" >> {{ vm_dir }}/build_information
76+
args:
77+
chdir: "{{ vm_dir }}"
78+
executable: /bin/bash
79+
6980
- name: Start the virtual machine. Vagrant may attempt to install VirtualBox Guest Additions here.
7081
shell: vagrant up --no-provision > {{ vm_name }}.log
7182
chdir={{ vm_dir }}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
dependencies:
3+
- yaegashi.blockinfile
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
# This Ansible playbook creates a characteristics file to help with bug
3+
# reporting.
4+
5+
- name: Obtain version information.
6+
command: cat /vagrant/repository_version
7+
register: text
8+
9+
- name: Obtain date.
10+
command: date
11+
register: date
12+
13+
- name: Obtain other information.
14+
command: cat /vagrant/build_information
15+
register: build_info
16+
17+
- name: Write characteristics file.
18+
blockinfile:
19+
dest=/virtualmicromagnetics_machine_characteristics.txt
20+
create=yes
21+
marker="# --- {mark} ADDED BY ANSIBLE ---"
22+
content="Build virtualmicromagnetics version{{':'}} {{ text.stdout }}\nBuild date{{':'}} {{ date.stdout }}\n{{ build_info.stdout }}"
23+
sudo: yes

0 commit comments

Comments
 (0)