Local Server Deployment with Ansible

125 views
Skip to first unread message

Casey Rudge

unread,
Jul 20, 2016, 12:37:57 PM7/20/16
to ozoneplatform-users
Good afternoon,

I am attempting to install OZP in a vagrant-free installation on CentOS 6.8.  I have followed the instructions for a localhost deployment found in the OZP-Ansible repo notes.

In my hosts_local file I put the computer IP under the [ozpdev] and [staticserver] variables.  I have also tried using variants of "localhost" "127.0.0.1" and computer names 


I get the below error output when I run the "ansible-playbook site.yml -i ./hosts_local --connection=local" command.  It looks like the playbook fails on a task when it packages the ozp_center

I've attempted deleting the /usr/local/ozp directory on the original computer and installing on a different, fresh computer as well.  Can someone point me in the right direction?

TASK [ozp_center : Build, test, and create tarball for center release] *********
fatal: [10.0.2.15]: FAILED! => {"changed": true, "cmd": "source /usr/local/node_versions/set_node_version.sh 5.3.0;npm install; npm run build;npm run tarDistDate", "delta": "0:00:57.954838", "end": "2016-07-20 09:56:37.072576", "failed": true, "rc": 1, "start": "2016-07-20 09:55:39.117738", "stderr": "npm ERR! Linux 2.6.32-642.3.1.el6.x86_64\nnpm ERR! argv \"/usr/local/node_versions/5.3.0/bin/node\" \"/usr/local/node_versions/5.3.0/bin/npm\" \"install\"\nnpm ERR! node v5.3.0\nnpm ERR! npm  v3.3.12\nnpm ERR! path /home/ozp/.npm/_git-remotes\nnpm ERR! code EACCES\nnpm ERR! errno -13\nnpm ERR! syscall mkdir\n\nnpm ERR! Error: EACCES: permission denied, mkdir '/home/ozp/.npm/_git-remotes'\nnpm ERR!     at Error (native)\nnpm ERR!  { [Error: EACCES: permission denied, mkdir '/home/ozp/.npm/_git-remotes']\nnpm ERR!   errno: -13,\nnpm ERR!   code: 'EACCES',\nnpm ERR!   syscall: 'mkdir',\nnpm ERR!   path: '/home/ozp/.npm/_git-remotes' }\nnpm ERR! \nnpm ERR! Please try running this command again as root/Administrator.\n\nnpm ERR! Please include the following file with any support request:\nnpm ERR!     /usr/local/ozp/build/ozp-center/npm-debug.log\n\nnpm ERR! Linux 2.6.32-642.3.1.el6.x86_64\nnpm ERR! argv \"/usr/local/node_versions/5.3.0/bin/node\" \"/usr/local/node_versions/5.3.0/bin/npm\" \"run\" \"build\"\nnpm ERR! node v5.3.0\nnpm ERR! npm  v3.3.12\nnpm ERR! code ELIFECYCLE\nnpm ERR! cent...@1.1.35 build: `NODE_ENV=\"production\" gulp build`\nnpm ERR! Exit status 1\nnpm ERR! \nnpm ERR! Failed at the cent...@1.1.35 build script 'NODE_ENV=\"production\" gulp build'.\nnpm ERR! Make sure you have the latest version of node.js and npm installed.\nnpm ERR! If you do, this is most likely a problem with the center-ui package,\nnpm ERR! not with npm itself.\nnpm ERR! Tell the author that this fails on your system:\nnpm ERR!     NODE_ENV=\"production\" gulp build\nnpm ERR! You can get their info via:\nnpm ERR!     npm owner ls center-ui\nnpm ERR! There is likely additional logging output above.\n\nnpm ERR! Please include the following file with any support request:\nnpm ERR!     /usr/local/ozp/build/ozp-center/npm-debug.log\n\nnpm ERR! Linux 2.6.32-642.3.1.el6.x86_64\nnpm ERR! argv \"/usr/local/node_versions/5.3.0/bin/node\" \"/usr/local/node_versions/5.3.0/bin/npm\" \"run\" \"tarDistDate\"\nnpm ERR! node v5.3.0\nnpm ERR! npm  v3.3.12\nnpm ERR! code ELIFECYCLE\nnpm ERR! cent...@1.1.35 tarDistDate: `gulp tarDistDate`\nnpm ERR! Exit status 1\nnpm ERR! \nnpm ERR! Failed at the cent...@1.1.35 tarDistDate script 'gulp tarDistDate'.\nnpm ERR! Make sure you have the latest version of node.js and npm installed.\nnpm ERR! If you do, this is most likely a problem with the center-ui package,\nnpm ERR! not with npm itself.\nnpm ERR! Tell the author that this fails on your system:\nnpm ERR!     gulp tarDistDate\nnpm ERR! You can get their info via:\nnpm ERR!     npm owner ls center-ui\nnpm ERR! There is likely additional logging output above.\n\nnpm ERR! Please include the following file with any support request:\nnpm ERR!     /usr/local/ozp/build/ozp-center/npm-debug.log", "stdout": "Setting node version to 5.3.0\n\n> cent...@1.1.35 build /usr/local/ozp/build/ozp-center\n> NODE_ENV=\"production\" gulp build\n\n[09:56:36] Local gulp not found in /usr/local/ozp/build/ozp-center\n[09:56:36] Try running: npm install gulp\n\n> cent...@1.1.35 tarDistDate /usr/local/ozp/build/ozp-center\n> gulp tarDistDate\n\n[09:56:37] Local gulp not found in /usr/local/ozp/build/ozp-center\n[09:56:37] Try running: npm install gulp", "stdout_lines": ["Setting node version to 5.3.0", "", "> cent...@1.1.35 build /usr/local/ozp/build/ozp-center", "> NODE_ENV=\"production\" gulp build", "", "[09:56:36] Local gulp not found in /usr/local/ozp/build/ozp-center", "[09:56:36] Try running: npm install gulp", "", "> cent...@1.1.35 tarDistDate /usr/local/ozp/build/ozp-center", "> gulp tarDistDate", "", "[09:56:37] Local gulp not found in /usr/local/ozp/build/ozp-center", "[09:56:37] Try running: npm install gulp"], "warnings": []}

NO MORE HOSTS LEFT *************************************************************
    to retry, use: --limit @site.retry

PLAY RECAP *********************************************************************
10.0.2.15                  : ok=131  changed=79   unreachable=0    failed=1   


Ross Pokorny

unread,
Jul 20, 2016, 12:46:02 PM7/20/16
to ozoneplat...@googlegroups.com
Casey

The fundamental error appears to be "EACCES: permission denied, mkdir '/home/
ozp/.npm/_git-remotes'"

Make sure that you are running everything as a user who has write access to /
home/ozp and /home/ozp/.npm (presumably, this would be the `ozp` user).

Ross Pokorny

Casey Rudge

unread,
Jul 20, 2016, 6:35:37 PM7/20/16
to ozoneplatform-users
I ran the ansible playbook in a command prompt as ozp:  

ansible-playbook site.yml -i ./hosts_local --connection=local -u ozp

TASK [nginx : Download nginx source] *******************************************
fatal: [10.0.2.15]: FAILED! => {"changed": false, "failed": true, "module_stderr": "/usr/bin/python: can't open file '/root/.ansible/tmp/ansible-tmp-1469053206.62-230098567737520/get_url': [Errno 13] Permission denied\n", "module_stdout": "", "msg": "MODULE FAILURE", "parsed": false}


Do I need to add OZP to a special group (with usermod) so it can get access to the directory?


Before I posted this I tried running the ansible playbook with users.  Running as root yielded the  EACCES: permission denied error on the ozp dirs like before.


Casey

Casey Rudge

unread,
Jul 22, 2016, 3:36:11 PM7/22/16
to ozoneplatform-users
I was able to manually change directory permissions and add users to groups to make the playbook run all the way without failing.  When I try to navigate to the http://localhost:4440/center/ it is unable to display.  Looking at the open ports there is an ngnix and a db port open but none for the web components on 4440.   


Casey Rudge

unread,
Aug 12, 2016, 1:58:20 PM8/12/16
to ozoneplatform-users
This is resolved,  I was setting the $PATH variable to the wrong value for the Ansible installation directory.
Reply all
Reply to author
Forward
0 new messages