Add all files needed to bring up VM and run agaric.com locally

This commit is contained in:
benjamin melançon 2018-08-20 10:45:20 -04:00
parent 52c8b60bac
commit 4d2bc0ee24
742 changed files with 24037 additions and 0 deletions

View file

@ -0,0 +1,2 @@
*.retry
tests/test.sh

View file

@ -0,0 +1,27 @@
---
services: docker
env:
- distro: centos7
- distro: centos6
- distro: ubuntu1604
- distro: ubuntu1404
- distro: ubuntu1204
script:
# Configure test script so we can run extra tests after playbook is run.
- export container_id=$(date +%s)
- export cleanup=false
# Download test shim.
- wget -O ${PWD}/tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/
- chmod +x ${PWD}/tests/test.sh
# Run tests.
- ${PWD}/tests/test.sh
# Ensure daemonize is available.
- 'docker exec --tty ${container_id} env TERM=xterm which daemonize'
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/

View file

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2017 Jeff Geerling
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -0,0 +1,43 @@
# Ansible Role: Daemonize
[![Build Status](https://travis-ci.org/geerlingguy/ansible-role-daemonize.svg?branch=master)](https://travis-ci.org/geerlingguy/ansible-role-daemonize)
Installs [Daemonize](http://software.clapper.org/daemonize/), a tool for running commands as a Unix daemon.
## Requirements
Make sure you have `gcc` or other build tools installed (e.g. `yum install make automake gcc gcc-c++ kernel-devel` on RedHat, or `apt-get install build-essential` on Debian) prior to running this role, as it builds Daemonize from source.
## Role Variables
Available variables are listed below, along with default values (see `defaults/main.yml`):
workspace: /root
The location where code will be downloaded and compiled.
daemonize_version: 1.7.5
The daemonize release version to install.
daemonize_install_path: "/usr"
The path where the compiled daemonize binary will be installed.
## Dependencies
None.
## Example Playbook
- hosts: servers
roles:
- { role: geerlingguy.daemonize }
## License
MIT / BSD
## Author Information
This role was created in 2014 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).

View file

@ -0,0 +1,5 @@
---
workspace: /root
daemonize_version: 1.7.7
daemonize_install_path: "/usr"

View file

@ -0,0 +1,28 @@
---
dependencies: []
galaxy_info:
author: geerlingguy
description: "Daemonize for Unix-like operating systems"
company: "Midwestern Mac, LLC"
license: "license (BSD, MIT)"
min_ansible_version: 1.6
platforms:
- name: EL
versions:
- all
- name: Ubuntu
versions:
- all
- name: Debian
versions:
- all
- name: GenericUNIX
versions:
- all
- any
galaxy_tags:
- development
- web
- system
- mail

View file

@ -0,0 +1,29 @@
---
- name: Download daemonize archive.
get_url:
url: "https://github.com/bmc/daemonize/archive/release-{{ daemonize_version }}.tar.gz"
dest: "{{ workspace }}/daemonize-{{ daemonize_version }}.tar.gz"
- name: Expand daemonize archive.
unarchive:
src: "{{ workspace }}/daemonize-{{ daemonize_version }}.tar.gz"
dest: "{{ workspace }}"
creates: "{{ workspace }}/daemonize-release-{{ daemonize_version }}/INSTALL"
copy: no
- name: Check if daemonize is installed.
command: which daemonize
changed_when: false
failed_when: false
register: daemonize_installed
- name: Build daemonize.
command: >
{{ item }}
chdir={{ workspace }}/daemonize-release-{{ daemonize_version }}
when: daemonize_installed.rc != 0
with_items:
- "./configure --prefix={{ daemonize_install_path }}"
- make
- make install
become: yes

View file

@ -0,0 +1,11 @@
# Ansible Role tests
To run the test playbook(s) in this directory:
1. Install and start Docker.
1. Download the test shim (see .travis.yml file for the URL) into `tests/test.sh`:
- `wget -O tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/`
1. Make the test shim executable: `chmod +x tests/test.sh`.
1. Run (from the role root directory) `distro=[distro] playbook=[playbook] ./tests/test.sh`
If you don't want the container to be automatically deleted after the test playbook is run, add the following environment variables: `cleanup=false container_id=$(date +%s)`

View file

@ -0,0 +1,28 @@
---
- hosts: all
pre_tasks:
- name: Ensure build dependencies are installed (RedHat).
yum: 'name="{{ item }}" state=present'
with_items:
- "@Development tools"
- tar
- unzip
when: ansible_os_family == 'RedHat'
- name: Update apt cache.
apt: update_cache=yes cache_valid_time=600
when: ansible_os_family == 'Debian'
changed_when: false
- name: Ensure build dependencies are installed (Debian).
apt: 'name="{{ item }}" state=installed'
with_items:
- build-essential
- unzip
- tar
- sudo
when: ansible_os_family == 'Debian'
roles:
- role_under_test