Git Product home page Git Product logo

ansible-dev-vm's People

Contributors

acouch avatar dafeder avatar dkinzer avatar grantdobbe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-dev-vm's Issues

Sendmail not working

In the old VM it would catch any outgoing mail and route it to the vagrant user's local mailbox. It seems that is not working on this VM at the moment:
screen shot 2015-07-08 at 12 20 18 pm

Git path fails on vagrant up

@acouch When I run vagrant up I got this message.

PLAY [all] ********************************************************************

GATHERING FACTS ***************************************************************
ok: [nucvicdev]

TASK: [geerlingguy.git | Ensure git is installed (RedHat).] *******************
skipping: [nucvicdev]

TASK: [geerlingguy.git | Ensure git is installed (Debian).] *******************
failed: [nucvicdev] => (item=git,git-svn) => {"failed": true, "item": "git,git-svn"}
stderr: E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/p/patch/patch_2.7.1-4ubuntu1_amd64.deb  404  Not Found [IP: 91.189.91.15 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

stdout: Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  git-man libapr1 libaprutil1 liberror-perl libserf-1-1 libsvn-perl libsvn1
  libterm-readkey-perl libyaml-libyaml-perl libyaml-perl patch
Suggested packages:
  git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk
  gitweb git-arch git-bzr git-cvs git-mediawiki subversion libyaml-shell-perl
  diffutils-doc
The following NEW packages will be installed:
  git git-man git-svn libapr1 libaprutil1 liberror-perl libserf-1-1
  libsvn-perl libsvn1 libterm-readkey-perl libyaml-libyaml-perl libyaml-perl
  patch
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 5606 kB of archives.
After this operation, 31.8 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty/main libapr1 amd64 1.5.0-1 [85.1 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty/main libaprutil1 amd64 1.5.3-1 [76.4 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libserf-1-1 amd64 1.3.3-1ubuntu0.1 [42.2 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libsvn1 amd64 1.8.8-1ubuntu3.1 [917 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libsvn-perl amd64 1.8.8-1ubuntu3.1 [802 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ trusty/main liberror-perl all 0.17-1.1 [21.1 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main git-man all 1:1.9.1-1ubuntu0.1 [698 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main git amd64 1:1.9.1-1ubuntu0.1 [2627 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu/ trusty/main libyaml-perl all 0.84-1 [68.3 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu/ trusty/main libterm-readkey-perl amd64 2.31-1 [27.4 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/universe git-svn all 1:1.9.1-1ubuntu0.1 [93.2 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libyaml-libyaml-perl amd64 0.41-5ubuntu0.14.04.1 [63.8 kB]
Err http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main patch amd64 2.7.1-4ubuntu1
  404  Not Found [IP: 91.189.91.15 80]
Fetched 5522 kB in 17s (315 kB/s)

msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold"   install 'git' 'git-svn'' failed: E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/p/patch/patch_2.7.1-4ubuntu1_amd64.deb  404  Not Found [IP: 91.189.91.15 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/Users/Mariano/playbook.retry

nucvicdev                  : ok=1    changed=0    unreachable=0    failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

Gems

learn how to add this to the .yml

sudo apt-get install ruby-dev
sudo gem install
 bootstrap-sass
 breakpoint
 bundler
 compass-rgbapng
 compass_radix
 font-awesome-sass
 sassy-maps
 sassy-buttons
 singularitygs
 zen-grids

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

When provision runs I'm getting:

failed: [nucvicdev] => {"changed": false, "cmd": ["mysql", "-NBe", "SELECT Host FROM mysql.user WHERE User = \"root\" ORDER BY (Host=\"localhost\") ASC"], "delta": "0:00:00.007756", "end": "2015-07-13 21:38:08.005020", "rc": 1, "start": "2015-07-13 21:38:07.997264", "stdout_lines": [], "warnings": []}
stderr: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

FATAL: all hosts have already failed -- aborting

Ansible provisioning fails with: role 'geerlingguy.git' was not found.

I tried loading this dev environment locally and got the following error:

==> nucvicdev: Running provisioner: ansible...
PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHost
sFile=/dev/null -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --private-ke
y=/home/dkinzer/projects/ansible-dev-vm/.vagrant/machines/nucvicdev/virtualbox/private_key --user=vagrant --co
nnection=ssh --limit='nucvicdev' --inventory-file=/home/dkinzer/projects/ansible-dev-vm/.vagrant/provisioners/
ansible/inventory --extra-vars={"ansible_ssh_user":"vagrant"} --sudo playbook.yml
ERROR! the role 'geerlingguy.git' was not found
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
dkinzer11:36[~/projects/ansible-dev-vm]

This is what's in the roles directory:

roles
├── nucivic
│   ├── tasks
│   │   └── main.yml
│   └── templates
│       ├── 10-help-text.j2
│       ├── bash.bashrc
│       ├── buck_qa
│       ├── git_attribute
│       ├── gitconfig
│       ├── gitignore
│       ├── make-random-password
│       ├── my.cnf.j2
│       └── runtags
├── nucivic-solr
│   ├── tasks
│   │   └── main.yml
│   └── templates
│       └── create-solr-instance
└── nucivic-vim
    ├── tasks
    │   └── main.yml
    └── templates
        └── vimrc

bash.bashrc produces errors with ssh -t

bind is not available for non-interactive shell. this fixes that:

if [ -n "$PS1" ]; then
  bind '"\e[A":history-search-backward'
  bind '"\e[B":history-search-forward'
fi

Issues with apache2 and vhost

apache2 problem

Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.

solution
sudo a2enmod headers

vhost problem
do we use drush aliases anymore? or buck? I've been using https://github.com/NuCivic/vhost
but the resulting file needs to be updated with the '.conf' to work on 14.04

mv mysite.local mysite.local.conf

Provider error when vagrant up

When I try to up my VM I'm getting:

The box you attempted to add doesn't match the provider you specified.

Provider expected: vmware_desktop, vmware_fusion, vmware_workstation
Provider of box: virtualbox

I'm tried with:

  • vagrant destroy
  • cloning the repo again
  • re install vagrant vmware plugin
  • vagrant up --provider=vmware_fusion
  • vagrant up --provider=vmware_desktop

There is still an issue with registry reload not being provisioned.

ref #34

TASK: [nucivic | Clone Registry Rebuild from Drupal.] ************************* 
failed: [nucvicdev] => {"failed": true}
msg: unsupported parameter for module: branch

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/Users/dkinzer/playbook.retry

nucvicdev                  : ok=159  changed=7    unreachable=0    failed=1   

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

@dafeder @acouch

Drupal code_sniffer is broken.

I was able to get vim Drupal Code_Sniffer to work locally by doing the following two things:

  1. Adding ~/.composer/vendor/bin to my $PATH env variable.
  2. Completely removing the old phpcs installed in ~/.composer/vendor and reinstalling using composer require drupal/coder: see https://www.drupal.org/node/1419988

There are several things that need to happen in order to make ansible do this for us.

  • phpcs needs to be in the shell PATH: #44
  • However an incompatible version of phpcs/coder is being added to the box we need to remove (I couldn't find it).
  • We need to install coder and enable sniffer following instructions in https://www.drupal.org/node/1419988 (once this happens vim picks it up automatically).

Often get problems mounting NFS

NFS mount fails with an error like:

mount.nfs: access denied by server while mounting 172.16.252.1:/Users/dfeder/vagrant/ansible-dev-vm/www

Fixed this once by changing the IP address in config.yml, which was not matching the IP vagrant was assigning to the machine, but then started getting the same error again.

Can't delete DKAN webroot from inside VM

I'm not sure if this is problem with the VM exactly, but deleting the built webroot of a DKAN instance seems to be impossible inside the VM, on both virtualbox and vmware:

vagrant@local:/var/www/dkan$ sudo rm -rf webroot
rm: cannot remove ‘webroot/sites/default/default.settings.php’: Permission denied
rm: cannot remove ‘webroot/sites/default/files’: Permission denied
rm: cannot remove ‘webroot/sites/default/settings.php’: Permission denied
vagrant@local:/var/www/dkan$

I need to rm it as sudo from my mac to get rid of it.

Vagrant files/folders should be owned by vagrant.

The ~/.drush and ~/.compser (there my be others) are owed by root. This is annoying because if you do anything with these folders you first have to remember to chown -R vagrant:vagrant the folders or you run into either annoying issue with .drush or weird issues with composer.

I know that as of at least ansible 1.4 you are allowed to change the remote_user on a per task base in order to avoid these sorts of issues.

fatal: [nucvicdev] => SSH Error: Permission denied (publickey,password).

 vagrant provision

==> nucvicdev: Running provisioner: ansible...
ERROR: cannot find role in /Users/janette/ansible-dev-vm/roles/ANXS.nodejs or /Users/janette/ansible-dev-vm/ANXS.nodejs or /usr/local/etc/ansible/roles/ANXS.nodejs
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

provision and resize fail

_error on vagrant provision_

TASK: [nucivic | Setup | Install required packages.] ************************** 
failed: [nucvicdev] => (item=figlet,ctags,unzip,vim,git,curl) => {"failed": true, "item": "figlet,ctags,unzip,vim,git,curl"}
stderr: E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

stdout: Reading package lists...
Building dependency tree...
Reading state information...
exuberant-ctags is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 linux-image-extra-3.16.0-50-generic : Depends: linux-image-3.16.0-50-generic but it is not going to be installed
 linux-image-generic-lts-utopic : Depends: linux-image-3.16.0-50-generic but it is not going to be installed

msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold"   install 'ctags'' failed: E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/Users/janette/playbook.retry

nucvicdev                  : ok=132  changed=4    unreachable=0    failed=1   

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

_unable to resize vm_
• currently 19G, only 3G available which causes mysql to crash often
• running apt-get -f install from above errors due to size problem (No space left on device)

Unpacking linux-image-3.16.0-50-generic (3.16.0-50.67~14.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.16.0-50-generic_3.16.0-50.67~14.04.1_amd64.deb (--unpack):
 cannot copy extracted data for './boot/System.map-3.16.0-50-generic' to '/boot/System.map-3.16.0-50-generic.dpkg-new': failed to write (No space left on device)
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.16.0-50-generic /boot/vmlinuz-3.16.0-50-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.16.0-50-generic /boot/vmlinuz-3.16.0-50-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.16.0-51-generic_3.16.0-51.69~14.04.1_amd64.deb
 /var/cache/apt/archives/linux-image-3.16.0-50-generic_3.16.0-50.67~14.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Terminus not working

The terminus-0.5.5 binary is in usr/local/lib but I have no terminus command available.

Also the binary is set to root:root with 644 permissions - that doesn't look right?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.