subuk / awx-rpm Goto Github PK
View Code? Open in Web Editor NEWRPM specs for ansible-awx project
RPM specs for ansible-awx project
Hi Subuk, I have installed awx rpm and running well in my local environment. I use version 1.0.1.225, and CentOS 7 as a host. A litle question, I have a plan to build cluster (HA Active Passive) with awx rpm using pcs. But I don't know what resource of awx must be added in pcs. Have you tried clustering awx in your local environment ?
I'm pretty sure that it's something on my side, but.. maybe this will be obvious for you. during the build I get an error message:
- embedded/bin/awx-manage collectstatic --noinput --clear
Traceback (most recent call last):
File "embedded/bin/awx-manage", line 11, in
sys.exit(manage())
File "/tmp/buildd/BUILD/awx-1.0.7/embedded/lib/python2.7/site-packages/awx/init.py", line 116, in manage
execute_from_command_line(sys.argv)
File "/tmp/buildd/BUILD/awx-1.0.7/embedded/lib64/python2.7/site-packages/django/core/management/init.py", line 364, in execute_from_command_line
utility.execute()
File "/tmp/buildd/BUILD/awx-1.0.7/embedded/lib64/python2.7/site-packages/django/core/management/init.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/tmp/buildd/BUILD/awx-1.0.7/embedded/lib64/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/tmp/buildd/BUILD/awx-1.0.7/embedded/lib64/python2.7/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/tmp/buildd/BUILD/awx-1.0.7/embedded/lib64/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 199, in handle
collected = self.collect()
File "/tmp/buildd/BUILD/awx-1.0.7/embedded/lib64/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 115, in collect
for path, storage in finder.list(self.ignore_patterns):
File "/tmp/buildd/BUILD/awx-1.0.7/embedded/lib64/python2.7/site-packages/django/contrib/staticfiles/finders.py", line 112, in list
for path in utils.get_files(storage, ignore_patterns):
File "/tmp/buildd/BUILD/awx-1.0.7/embedded/lib64/python2.7/site-packages/django/contrib/staticfiles/utils.py", line 28, in get_files
directories, files = storage.listdir(location)
File "/tmp/buildd/BUILD/awx-1.0.7/embedded/lib64/python2.7/site-packages/django/core/files/storage.py", line 397, in listdir
for entry in os.listdir(path):
OSError: [Errno 2] No such file or directory: '/tmp/buildd/BUILD/awx-1.0.7/embedded/lib/python2.7/site-packages/awx/ui/static'
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.cZXCf6 (%build)
bogus date in %changelog: Thu Nov 21 2017 18:14:55 +0300 Matvey Kruglov [email protected] 1.0.1.225-1
bogus date in %changelog: Wed Sep 21 2017 14:44:23 +0300 Matvey Kruglov [email protected] 1.0.0.505-1
Bad exit status from /var/tmp/rpm-tmp.cZXCf6 (%build)
make: stat: Makefile: Permission denied
make: *** No rule to make target `sdist'. Stop.
What's wrong?
Is there an upgrade path to upgrade AWX and Ansible for this build to AWX version 1.0.6.3 and Ansible 2.5. I have a few playbooks that aren't working because the current build is running Ansible 2.3.1.0
https://groups.google.com/forum/#!topic/awx-project/kHVOFVkl-ZI
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
The error appears to have been in '/var/lib/awx/projects/_7__test_project/fw_rules_port22.yml': line 5, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
/usr/lib/systemd/system/awx-daphne.service contains:
ExecStart=/opt/awx/bin/daphne -b 127.0.0.1 -p 8051 awx.asgi:channel_layer
Starting awx-daphne.service works, however, the daphne service never binds to 127.0.0.1:8051
lsof -P | grep 8051
..returns nothing.
Need to determine if there is a problem with the start up script or something within daphne not binding to 127.0.0.1:8051
Results is the RESTful Web UI does not update through the websocket
docker run -v
pwd:/awx --rm -it centos:7 /bin/bash <<EOF yum install -y epel-release && yum install -y bzip2 gcc-c++ git gettext make python-pip curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - yum install -y nodejs cd /awx/ make sdist EOF
The -it causes "the input device is not a TTY". Changing the switch to '-t' allows it to run.
OS: CentOS 7.4.1708
Docker: docker-ce-17.09.0.ce-1.el7.centos.x86_64
-bash-4.2# pwd
/root/awx-standalone/awx/awx-rpm
-bash-4.2# ls -lrt
total 128
-rw-r--r--. 1 root root 4088 Jun 3 22:21 settings.py.dist
-rw-r--r--. 1 root root 2719 Jun 3 22:21 README.md
-rw-r--r--. 1 root root 2435 Jun 3 22:21 nginx.conf.example
-rwxr-xr-x. 1 root root 742 Jun 3 22:21 build.sh
-rw-r--r--. 1 root root 704 Jun 3 22:21 awx-web.upstart
-rw-r--r--. 1 root root 891 Jun 3 22:21 awx-web.service
-rw-r--r--. 1 root root 32601 Jun 3 22:21 awx.spec
-rw-r--r--. 1 root root 385 Jun 3 22:21 awx-daphne.upstart
-rw-r--r--. 1 root root 529 Jun 3 22:21 awx-daphne.service
-rw-r--r--. 1 root root 390 Jun 3 22:21 awx-channels-worker.upstart
-rw-r--r--. 1 root root 538 Jun 3 22:21 awx-channels-worker.service
-rw-r--r--. 1 root root 470 Jun 3 22:21 awx-celery-worker.upstart
-rw-r--r--. 1 root root 592 Jun 3 22:21 awx-celery-worker.service
-rw-r--r--. 1 root root 403 Jun 3 22:21 awx-celery-beat.upstart
-rw-r--r--. 1 root root 545 Jun 3 22:21 awx-celery-beat.service
-rw-r--r--. 1 root root 369 Jun 3 22:21 awx-cbreceiver.upstart
-rw-r--r--. 1 root root 515 Jun 3 22:21 awx-cbreceiver.service
-rw-r--r--. 1 root root 32607 Jun 3 22:21 awx-build.spec
drwxr-xr-x. 2 root root 81 Jun 3 22:48 buildhelpers
-bash-4.2# sh -x build.sh centos-7
Dependencies Resolved
Updating:
yum-utils noarch 1.1.31-45.el7 base 119 k
Upgrade 1 Package
Total size: 119 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : yum-utils-1.1.31-45.el7.noarch 1/2
Cleanup : yum-utils-1.1.31-42.el7.noarch 2/2
Verifying : yum-utils-1.1.31-45.el7.noarch 1/2
Verifying : yum-utils-1.1.31-42.el7.noarch 2/2
Updated:
yum-utils.noarch 0:1.1.31-45.el7
Complete!
Any idea of this issue ?
systemctl start postgresql96-server
Should be:
systemctl start postgresql-9.6.service
Yes. Copied awx.spec to awx-build.spec .... still the same error ...
Seems that the error is not from awe-build.spec file or awx.spec file ..it is from the source directory :
-bash-4.2# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
-bash-4.2# sh -x build.sh centos-7
set -e
set -x
SPECFILE=/source/centos-7
yum install -y rpmdevtools yum-utils fakeroot
Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
docker-ee-stable-17.06 | 2.9 kB 00:00:00
epel/x86_64/metalink | 17 kB 00:00:00
epel | 3.2 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/3): epel/x86_64/updateinfo | 932 kB 00:00:00
(2/3): docker-ee-stable-17.06/x86_64/primary_db | 13 kB 00:00:01
(3/3): epel/x86_64/primary | 3.5 MB 00:00:00
Loading mirror speeds from cached hostfile
base: mirror.hostduplex.com
epel: mirror.hmc.edu
extras: mirror.hostduplex.com
updates: mirror.hostduplex.com
epel 12585/12585
Package rpmdevtools-8.3-5.el7.noarch already installed and latest version
Package yum-utils-1.1.31-45.el7.noarch already installed and latest version
Package fakeroot-1.18.4-2.el7.x86_64 already installed and latest version
Nothing to do
useradd -s /bin/bash builder
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
Creating mailbox file: File exists
chown builder. /cache -R
pushd /source
/source ~/awx-rpm-build/awx-rpm/buildhelpers
spectool -g /source/centos-7
Can't open '/source/centos-7': No such file or directory at /usr/bin/spectool line 314.
-bash-4.2#
Hi guys,
I'm having issues using proxycommand in this installation. SSH is working if used directly from the server, but I'm not able to modify the ansible.cfg (not present on the machine where the awx.rpm is installed). Is there a way to bypass that and modify the ansible.cfg?
SSH command with user awx
$ ssh -i ~/.ssh/awx_rsa USER@SERVER1 uptime
14:45:31 up 12 days, 16:38, 0 users, load average: 0.00, 0.00, 0.00
SSH config
Host SERVER1
HostName xx.xx.xx.xx
ServerAliveInterval 60
TCPKeepAlive yes
ProxyCommand ssh -q -A USER@JUMPHOST-i /var/lib/awx/.ssh/awx_rsa nc %h %p
AWX output from web
SERVER1| UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /var/lib/awx/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 53: Applying options for *\r\ndebug1: /etc/ssh/ssh_config line 60: Deprecated option "useroaming"\r\ndebug2: resolving "SERVER1" port 22\r\nssh: Could not resolve hostname SERVER1: Name or service not known\r\n",
"unreachable": true
}
Hello,
I'm trying to follow the instructions from the README file, however, some of the instructions doesn't seem to work. Example:
Cloning into 'awx'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I'm pulling down the current release since this release doesn't work. Any recommendations? Thanks
Awesome rpm .Can you please include this nginx.conf then the setup is ready
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
#tcp_nopush on;
#gzip on;
upstream uwsgi {
server localhost:8050;
}
upstream daphne {
server localhost:8051;
}
server {
listen 80 default_server;
# If you have a domain name, this is where to add it
server_name _;
keepalive_timeout 65;
# HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)
add_header Strict-Transport-Security max-age=15768000;
location /static/ {
alias /opt/awx/static/;
}
location /favicon.ico { alias /opt/awx/static/favicon.ico; }
location /websocket {
# Pass request to the upstream alias
proxy_pass http://daphne;
# Require http version 1.1 to allow for upgrade requests
proxy_http_version 1.1;
# We want proxy_buffering off for proxying to websockets.
proxy_buffering off;
# http://en.wikipedia.org/wiki/X-Forwarded-For
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# enable this if you use HTTPS:
proxy_set_header X-Forwarded-Proto https;
# pass the Host: header from the client for the sake of redirects
proxy_set_header Host $http_host;
# We've set the Host header, so we don't need Nginx to muddle
# about with redirects
proxy_redirect off;
# Depending on the request value, set the Upgrade and
# connection headers
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
location / {
# Add trailing / if missing
rewrite ^(.*[^/])$ $1/ permanent;
uwsgi_read_timeout 120s;
uwsgi_pass uwsgi;
include /etc/nginx/uwsgi_params;
}
}
}
Hi Subuk,
I have build with version 1.0.0.505, the build is successfull, but when I install in local environment (centos 7) the service does not go up.
this is the error from /var/log/messages
Nov 22 10:25:57 awx awx-manage: conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
Nov 22 10:25:57 awx awx-manage: django.db.utils.OperationalError: FATAL: role "root" does not exist
Nov 22 10:25:57 awx systemd: awx-celery-worker.service holdoff time over, scheduling restart.
what can I do ?
Thanks Subuk
Attempting to install 1.0.1.223.
Also, executing "sudo -u awx /opt/awx/bin/awx-manage --help" results in:
Traceback (most recent call last):
File "/opt/awx/bin/awx-manage", line 11, in
sys.exit(manage())
File "/opt/awx/embedded/lib/python2.7/site-packages/awx/init.py", line 93, in manage
prepare_env()
File "/opt/awx/embedded/lib/python2.7/site-packages/awx/init.py", line 48, in prepare_env
if not settings.DEBUG: # pragma: no cover
File "/opt/awx/embedded/lib64/python2.7/site-packages/django/conf/init.py", line 56, in getattr
self._setup(name)
File "/opt/awx/embedded/lib64/python2.7/site-packages/django/conf/init.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/opt/awx/embedded/lib64/python2.7/site-packages/django/conf/init.py", line 110, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib64/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/opt/awx/embedded/lib/python2.7/site-packages/awx/settings/production.py", line 95, in
include(settings_file, optional(settings_files), scope=locals())
File "/opt/awx/embedded/lib/python2.7/site-packages/split_settings/tools.py", line 101, in include
exec(compile(to_compile.read(), included_file, 'exec'), scope)
File "/etc/awx/settings.py", line 34, in
CELERY_QUEUES += (Queue(CLUSTER_HOST_ID, Exchange(CLUSTER_HOST_ID), routing_key=CLUSTER_HOST_ID),)
NameError: name 'CELERY_QUEUES' is not defined
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.