{"id":18809261,"url":"https://github.com/thingsym/vap","last_synced_at":"2025-10-08T05:44:42.577Z","repository":{"id":144902941,"uuid":"61697823","full_name":"thingsym/vap","owner":"thingsym","description":"VAP (Vagrant Ansible Programming languages) is Ansible playbooks for website developer and programmer.","archived":false,"fork":false,"pushed_at":"2024-07-22T08:31:40.000Z","size":591,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T22:40:50.847Z","etag":null,"topics":["ansible","playbook","vagrant"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thingsym.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"thingsym"}},"created_at":"2016-06-22T07:21:28.000Z","updated_at":"2024-07-22T08:26:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"6f85878e-f840-469a-9787-ef9d7af16937","html_url":"https://github.com/thingsym/vap","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsym%2Fvap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsym%2Fvap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsym%2Fvap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsym%2Fvap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thingsym","download_url":"https://codeload.github.com/thingsym/vap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239743244,"owners_count":19689467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","playbook","vagrant"],"created_at":"2024-11-07T23:15:48.275Z","updated_at":"2025-10-08T05:44:37.518Z","avatar_url":"https://github.com/thingsym.png","language":"Jinja","readme":"# VAP (Vagrant Ansible Programming languages)\n\n**VAP (Vagrant Ansible Programming languages)** is Ansible playbooks for website developer and programmer.\n\n## Features\n\n### 1. OS Distribution Compatibility\n\n**VAP** support **CentOS**, **Debian** and **Ubuntu** Boxes.\n\n### 2. Build Server and Database environment\n\n**VAP** will build server from **Apache** or **nginx** or **H2O**, and build database from **MySQL**, **MariaDB**.\n\nOn all web servers, FastCGI configuration is possible. Build PHP execution environment from **PHP-FPM** (FastCGI Process Manager).\n\nBy default, the server and the databese is installed in the default settings. Also you can edit configuration files.\n\n### 3. Build Programming environment\n\n**VAP** will build a Programming languages that specifies the version.\n\n* [Ruby](https://www.ruby-lang.org/)\n* [Python](https://www.python.org/)\n* [PHP](https://secure.php.net)\n* [Perl](https://www.perl.org/)\n* [Node.js](http://nodejs.org)\n* [Go](https://golang.org/)\n* [Java (OpenJDK)](http://openjdk.java.net/)\n* [Scala](http://www.scala-lang.org/)\n\n### 4. Develop \u0026 Deploy Tools\n\nYou can install the develop tools or the deploy tools by usage. See Specification for list of installed tools.\n\n## Requirements\n\n* [Oracle VM VirtualBox](https://www.virtualbox.org) \u003e= 6.1\n* [Vagrant](https://www.vagrantup.com) \u003e= 2.2\n* [Ansible](https://www.ansible.com) \u003e= 2.9\n\n#### Optional\n\n* [mkcert](https://github.com/FiloSottile/mkcert)\n\n#### Vagrant plugin (optional)\n\n* [vagrant-hostsupdater](https://github.com/cogitatio/vagrant-hostsupdater)\n* [vagrant-vbguest](https://github.com/dotless-de/vagrant-vbguest)\n* [vagrant-serverspec](https://github.com/jvoorhis/vagrant-serverspec)\n\n## Usage\n\n### 1. Install Virtualbox\n\nDownload the VirtualBox form [www.virtualbox.org](https://www.virtualbox.org) and install.\n\n### 2. Install Vagrant\n\nDownload the Vagrant form [www.vagrantup.com](https://www.vagrantup.com) and install.\n\n### 3. Download Ansible playbooks of VAP\n\nDownload a Vagrantfile and Ansible playbooks from the following link.\n\n[Download Zip format file](https://github.com/thingsym/vap/archive/master.zip)\n\n### 4. Generate SSL certificate files using mkcert\n\nInstall mkcert. See [https://github.com/FiloSottile/mkcert](https://github.com/FiloSottile/mkcert)\n\n\tcd vap-x.x.x\n\tmkcert -install\n\tmkdir mkcert\n\tmkcert -cert-file ./mkcert/cert.pem -key-file ./mkcert/privkey.pem \u003cvm_hostname\u003e\n\n### 5. Launch a virtual environment\n\n\tcd vap-x.x.x\n\tvagrant up\n\nIf you don't have a Box at first, begins from the download of Box. After provisioning, you can launch a Programming environment.\n\nNote: Passwordless for Vagrant::Hostsupdater. See [Suppressing prompts for elevating privileges\n](https://github.com/agiledivider/vagrant-hostsupdater#suppressing-prompts-for-elevating-privileges)\n\n### 6. Access to the website\n\nAccess to the website **http://vap.local/**, if the server is running.\n\n### 7. Access to a Vagrant machine via SSH\n\n\tvagrant ssh\n\nOr using ssh config.\n\n\tvagrant ssh-config \u003e ssh_config.cache\n\tssh -F ssh_config.cache default\n\n## Default configuration Variables\n\nID and password for the initial setting is as follows. Can be set in the provisioning configuration file.\n\n#### Database\n\n* ROOT USER `root`\n* ROOT PASSWORD `admin`\n* HOST `localhost`\n\n## Customize Options\nYou can build a variety of environment that edit the configuration file of VAP.\n\nThere are two configuration files you can customize.\n\nRun `vagrant up` or `vagrant provision`, after editing the configuration file.\n\n### Vagrant configuration file (Ruby)\n\nVagrant configuration file is **Vagrantfile**.\n\nVagrantfile will set the vagrant Box, private IP address, hostname and the document root.\n\nIf you launch multiple environments, change the name of the directory. you should rewrite `vm_ip` and` vm_hostname`. Note not to overlap with other environments.\n\nYou can accesse from a terminal in the same LAN to use the public network to Vagrant virtual environment. To use public networks, set IP address for bridged connection to `public_ip`. In that case, recommended that configure the same IP address to `vm_hostname`.\n\nYou can choose the ansible install mode, the default or the pip.\n\nThe default is to install Ansible from the operating system package manager, via yum or apt.\nThe pip is to install Ansible from the Python package manager. In this case, you can install a specific version of Ansible.\n\n\t## Vagrant Settings ##\n\n\tvm_box                = 'centos/7'\n\tvm_box_version        = '\u003e= 0'\n\tvm_ip                 = '192.168.59.63'\n\tvm_hostname           = 'vap.local'\n\tvm_document_root      = '/var/www/html'\n\n\tpublic_ip             = ''\n\n\tforwarded_port        = []\n\n\tvbguest_auto_update   = true\n\tsynced_folder_type    = 'virtualbox' # virtualbox|nfs|rsync|smb\n\n\tansible_install_mode  = :default    # :default|:pip\n\tansible_version       = 'latest'    # only :pip required\n\n\tvagrant_plugins       = [\n\t\t'vagrant-hostsupdater',\n\t\t'vagrant-vbguest',\n\t\t'vagrant-serverspec'\n\t]\n\n* `vm_box` (required) name of Vagrant Box (default: `centos/7`)\n* `vm_box_version` (required) version of Vagrant Box (default: `\u003e= 0`)\n* `vm_ip` (required) private IP address (default: `192.168.59.63`)\n* `vm_hostname` (required) hostname (default: `vap.local`)\n* `vm_document_root` (required) document root path (default: `/var/www/html`)\n\t* auto create `html` directory and synchronized\n* `public_ip` IP address of bridged connection (default: `''`)\n* `forwarded_port` list of ports that you want to transfer (default: `[]`)\n* `vbguest_auto_update` whether to update VirtualBox Guest Additions (default: `true` / value: `true` | `false`)\n* `synced_folder_type` the type of synced folder (default: `virtualbox` / value: `virtualbox` | `nfs` | `rsync` | `smb`)\n* `ansible_install_mode` (required) the way to install Ansible (default: `:default` / value: `:default` | `:pip`)\n* `ansible_version` version of Ansible to install (default: `latest`)\n* `vagrant_plugins` install vagrant plugins\n\n### Provisioning configuration file (YAML)\n\nProvisioning configuration file is **group_vars/all.yml**.\n\nIn YAML format, you can set server, database and Programming environment. And can enable the develop and deploy tools.\n\n\t## Server \u0026 Database Settings ##\n\n\tserver             : none   # none|apache|nginx|h2o|litespeed\n\tfastcgi            : none   # none|php-fpm\n\tdatabase           : none   # none|mysql|mariadb\n\n\tdb_root_password   : admin\n\n\t## Programming languages Settings ##\n\t# If the version is set to 0, the programming language does not install\n\tpython_version     : 3.12.2      # 3.12.2\n\truby_version       : 3.2.2       # 3.2.2\n\tphp_version        : 8.2.19      # 8.2.19\n\tperl_version       : 5.38.0      # 5.38.0\n\tnode_version       : 14.21.3     # 14.21.3\n\tgo_version         : 1.15.6      # 1.15.6\n\tjava_version       : 17          # 17 # 11 or 17 LTS\n\tscala_version      : 2.11.12     # 2.11.12 (require java)\n\n\n\t## Develop \u0026 Deploy Settings ##\n\n\tssl                : true    # true|false\n\tdocker             : false   # true|false\n\tphpmyadmin         : false   # true|false (require PHP and database)\n\n\t## That's all, stop setting. Let's vagrant up!! ##\n\n#### Server \u0026 Database Settings ##\n\n* `server` (required) name of web server (default: `none` / value: `none` | `apache` | `nginx` | `h2o` | `litespeed` )\n* `fastcgi` name of fastCGI (default: `none` / value: `none` | `php-fpm`)\n* `database` (required) name of databese (default: `none` / value: `none` | `mysql` | `mariadb`)\n\n#### Programming languages Settings ##\n\n* `python_version` version of Python (default: `3.12.2`)\n* `ruby_version` version of Ruby (default: `3.2.2`)\n* `php_version` version of PHP (default: `8.2.19`)\n* `perl_version` version of Perl (default: `5.38.0`)\n* `node_version` version of Node.js (default: `14.21.3`)\n* `go_version` version of Go (default: `1.15.6`)\n* `java_version` version of Java (default: `17`)\n* `scala_version` version of Scala (default: `2.11.12`) require Java\n\nIf the version is set to 0, the programming language does not installation\n\n#### Develop \u0026 Deploy Settings ##\n\n* `ssl` activate ssl (default: `true` / value: `true` | `false`)\n* `docker` docker installed (default: `false` / value: `true` | `false`)\n* `phpmyadmin` activate phpMyAdmin (default: `false` / value: `true` | `false`)\n\n## Directory Layout\n\nDirectory structure of VAP is as follows.\n\nThis directory synchronize to the guest OS side `/vagrant`. `html` creates automatically and synchronize to `vm_document_root`.\n\n### Full Layout\n\n* command (stores shell script)\n* config (stores Custom Config)\n* config.sample (sample Custom Config)\n* group_vars (stores the provisioning configuration file of Ansible)\n\t* all.yml (provisioning configuration file)\n* hosts\n\t* local (inventory file)\n* html (synchronize to the Document Root. create automatically at `vagrant up`, if it does not exist.)\n* mkcert (stores SSL certificate files)\n* Rakefile (Rakefile of ServerSpec)\n* README.md\n* roles (stores Ansible playbook of each role)\n* site.yml (Ansible playbook core file)\n* spec (stores ServerSpec spec file)\n\t* localhost\n\t* spec_helper.rb\n* Vagrantfile (Vagrant configuration file)\n\n### Minimum Layout\n\nVAP will be built in the directory structure of the following minimum unit.\n\n* group_vars (stores the provisioning configuration file of Ansible)\n\t* all.yml (provisioning configuration file)\n* html (synchronize to the Document Root. create automatically at `vagrant up`, if it does not exist.)\n* roles (stores Ansible playbook of each role)\n* site.yml (Ansible playbook core file)\n* Vagrantfile (Vagrant configuration file)\n\n## Vagrant Boxs\n\n**VAP** supports VirtualBox for providers of Vagrant. Operating system supported CentOS, Debian and Ubuntu Boxes. OS architecture supported x86_64. Details are as follows:\n\n### Debian\n\n* Debian 12.0\n* Debian 11.0\n* Debian 10.0 (Deprecated ended 2024-06-30)\n* Debian 9.0 (Deprecated ended 2022-06-30)\n* Debian 8.0 (Deprecated ended 2020-06-30)\n\n### Ubuntu\n\n* Ubuntu 20.04\n* Ubuntu 18.04\n* Ubuntu 16.04\n* Ubuntu 14.04\n\n### CentOS\n\n* CentOS 8 (Deprecated ended 2021-12-31)\n* CentOS 7 (Deprecated ended 2024-06-30)\n* CentOS 6 (Deprecated ended 2020-11-30)\n\nTo download Vagrant Box, you can search from [Discover Vagrant Boxes](https://app.vagrantup.com/boxes/search?provider=virtualbox).\n\n## Specification\n\n### Server (Selectable)\n\n* [Apache](http://httpd.apache.org)\n* [nginx](http://nginx.org)\n* [H2O](https://h2o.examp1e.net/)\n* [LiteSpeed](https://www.litespeedtech.com)\n\n### FastCGI (Selectable, Only nginx)\n\n* [PHP-FPM](http://php-fpm.org) (FastCGI Process Manager)\n\n### Database (Selectable)\n\n* [MariaDB](https://mariadb.org)\n* [MySQL](http://www.mysql.com)\n\n### Programming languages\n\n* [Ruby](https://www.ruby-lang.org/)\n\t* via [rbenv](https://github.com/rbenv/rbenv)\n\t* [ruby-build](https://github.com/rbenv/ruby-build)\n\t* [rbenv-default-gems](https://github.com/rbenv/rbenv-default-gems)\n* [Python](https://www.python.org/)\n\t* via [pyenv](https://github.com/yyuu/pyenv)\n\t* [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv)\n* [PHP](https://secure.php.net)\n\t* via [phpenv](https://github.com/madumlao/phpenv)\n\t* [php-build](https://github.com/php-build/php-build)\n\t* [phpenv-composer](https://github.com/ngyuki/phpenv-composer)\n\t* [phpenv-apache-version](https://github.com/thingsym/phpenv-apache-version)\n* [Perl](https://www.perl.org/)\n\t* via [plenv](https://github.com/tokuhirom/plenv)\n\t* [Perl-Build](https://github.com/tokuhirom/Perl-Build)\n\t* [cpanm](https://metacpan.org/release/App-cpanminus)\n\t* [cpm](https://metacpan.org/release/App-cpm)\n\t* [Server::Starter](https://metacpan.org/release/Server-Starter)\n* [Node.js](http://nodejs.org)\n\t* via [nodenv](https://github.com/nodenv/nodenv)\n\t* [node-build](https://github.com/nodenv/node-build)\n\t* [nodenv-default-packages](https://github.com/nodenv/nodenv-default-packages)\n\t* [Yarn](https://yarnpkg.com/en/)\n* [Go](https://golang.org/)\n\t* via [goenv](https://github.com/wfarr/goenv)\n* [Java (OpenJDK)](http://openjdk.java.net/)\n\t* via [jenv](http://www.jenv.be/)\n* [Scala](http://www.scala-lang.org/)\n\t* via [scalaenv](https://github.com/mazgi/scalaenv)\n\n### Develop \u0026 Deploy Tools (Activatable)\n\n* [Docker](https://www.docker.com)\n* [phpMyAdmin](https://www.phpmyadmin.net)\n\n### Pre-installing\n* [Git](http://git-scm.com)\n\n### Helper command\n\n* after_provision.sh\n* before_provision.sh\n* phpenv.sh\n* plenv.sh\n* pyenv.sh\n* rbenv.sh\n\n## Helper command\n\n**VAP** offers a useful scripts. Just run the script on a terminal. Multiple versions installation of Python, Ruby, PHP and Perl, you can switch the execution environment.\n\n### pyenv.sh\n\n`pyenv.sh` will prepare the specified version of Python execution environment.\n\n\t/vagrant/command/pyenv.sh 3.12.2\n\n### rbenv.sh\n\n`rbenv.sh` will prepare the specified version of Ruby execution environment.\n\n\t/vagrant/command/rbenv.sh 3.2.2\n\t/vagrant/command/rbenv.sh mruby-1.1.0\n\n### phpenv.sh\n\n`phpenv.sh` will prepare the specified version of PHP execution environment. You can install the specified version of PHP. Switching the PHP version. And then restart Apache or PHP-FPM by switching the server configuration environment.\n\n\t/vagrant/command/phpenv.sh -v 8.2.19 -m php-fpm -s unix\n\n\t# help\n\t/vagrant/command/phpenv.sh -h\n\n### plenv.sh\n\n`plenv.sh` will prepare the specified version of Perl execution environment.\n\n\t/vagrant/command/plenv.sh 5.38.0\n\n## Custom Config\n\nYou can edit the configuration files.\nWhen you add tuning configuration files in the directory `config`, tuning configuration files are placed at provisioning time.\n\nAs follows editable configuration files.\n\n* apache2.000-default.conf.j2\n* apache2.conf.j2\n* apache2.default-ssl.conf.j2\n* apache2.envvars.j2\n* default-node-packages.j2\n* default-ruby-gems.j2\n* h2o.conf.j2\n* httpd.conf.centos6.j2\n* httpd.conf.centos7.j2\n* httpd.www.conf.centos7.j2\n* mariadb.my.cnf.j2\n* mysql.my.cnf.j2\n* nginx.conf.j2\n* nginx.www.conf.j2\n* php-build.default_configure_options.j2\n* php-fpm.conf (for phpenv.sh)\n* php-fpm.www.conf (for phpenv.sh)\n* php.ini (for phpenv.sh)\n* ssh-config.j2\n\n## Trouble shooting\n\n### Vagrant can't mount to /mnt when vagrant up.\n\nThe following `umount /mnt` error message is displayed.\n\n```\nThe following SSH command responded with a non-zero exit status.\nVagrant assumes that this means the command failed!\n\numount /mnt\n\nStdout from the command:\n\n\nStderr from the command:\n\numount: /mnt: not mounted\n```\n\nIt may happens if the kernel version of OS used in vagrant box does not match the requirements.\n\nThe solution is to update the kernel and provision again. It may also be resolved by updating the vagrant box.\n\n1. Access to a guest via SSH.\n\n```\nvagrant ssh\n```\n\n2. Update the kernel into guest OS.\n\n#### Debian or Ubuntu\n\n```\nsudo apt-get -y install linux-image-amd64 linux-headers-amd64\n```\n\n#### CentOS\n\n```\nsudo yum -y update kernel kernel-devel kernel-headers kernel-tools kernel-tools-libs\n\nexit\n```\n\n3. Provision again on the host.\n\n```\nvagrant reload\n```\n\n## Contribution\n\n### Patches and Bug Fixes\n\nSmall patches and bug reports can be submitted a issue tracker in Github. Forking on Github is another good way. You can send a pull request.\n\n1. Fork [VAP](https://github.com/thingsym/vap) from GitHub repository\n2. Create a feature branch: git checkout -b my-new-feature\n3. Commit your changes: git commit -am 'Add some feature'\n4. Push to the branch: git push origin my-new-feature\n5. Create new Pull Request\n\n## Changelog\n\nSee CHANGELOG.md\n\n## License\n\nVAP is distributed under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.html).\n\n## Author\n\n[thingsym](https://github.com/thingsym)\n\nCopyright (c) 2016-2020 thingsym\n","funding_links":["https://github.com/sponsors/thingsym"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthingsym%2Fvap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthingsym%2Fvap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthingsym%2Fvap/lists"}