jessepeterson / margarita Goto Github PK
View Code? Open in Web Editor NEWWeb frontend for reposado
License: The Unlicense
Web frontend for reposado
License: The Unlicense
I have a clean install with the following steps:
#!/bin/bash
INSTALLLOG=/var/log/reposado.log
DATE=$(date +"%m-%d-%y %T")
#prereq checks
if ! [ $(id -u) = 0 ]; then
printf "This script must be run as root!\n"
exit 1
fi
#repo
yum install epel-release -y && yum install git -y && yum install python-pip -y
#installing the needed libraries
easy_install flask && easy_install simplejson
#Go to the root of your drive and clone the sources of Margarita to your server
cd /
mkdir margarita
git clone git://github.com/jessepeterson/margarita.git
#Move the margarita directory to /usr/local/sbin/
mv margarita/ /usr/local/sbin/
#Margarita needs to know where are stored the Reposado files
cd /usr/local/sbin/margarita
ln -s /usr/local/sbin/reposado/code/reposadolib/ .
ln -s /usr/local/sbin/reposado/code/preferences.plist .
#Firewall rule
iptables -I INPUT -p tcp --dport 8089 -j ACCEPT
iptables-save > /etc/sysconfig/iptables
#Start server
/usr/bin/python /usr/local/sbin/margarita/margarita.py
After starting I get:
Traceback (most recent call last):
File "/usr/local/sbin/margarita/margarita.py", line 17, in
from reposadolib import reposadocommon
if I commend out "reposadolib" from line 17 in the file margarita.py than it starts but is not working proper. What do I mis?
While it may not be a configuration that most people might need I have found what I believe to be a bug. If you create two (or more) branches and have the updates enabled in both (i.e. all) branches, then the updates are no longer shown in the Margarita web interface. A scenario might be wanting to created a released branch with most updates enabled, and a test branch with all updates enabled. It would be quicker to create initially the released branch with all updates enabled and then disable those not wanted rather than enabling them all individually.
A workaround for when you get in to this state would either be to use the reposado command line or in margarita add an additional branch with no updates enabled, it will then show the other branches contents again.
I am running margarita under OS X 10.8.3 with flask. Updates have been downloaded to the local reposado repository.
got me a working reposado which i love. so i wanted to give margarita a shot. got a git clone of margarita & flask. i've created the symlinks as instructed, but i'm missing something. when I navigate to the margarita folder (/etc/margarita on my OSX Lion server) and run:
sh-3.2# python margarita.py
i get:
which i know can't be right because (a) that number ain't good and (b) no web browser launches.
perhaps someone can point me to a reference guide/walkthrough that can help me better understand what i've missed or screwed up. my best guess: i'm pointing my symlinks to the wrong place?
dunno.
Is there anyway to have this off by default ?
I have a had a poke around the code and can make the tick be off, but the function is still on
When running margarita every visitor of the web application is able to make changes. Please integrate a simple authentication form: http://packages.python.org/Flask-Login/
Greetings,
I have successfully install reposado in Ubuntu Server 12 and it is syncing from Apple.
I have installed flask (flask 0.9) & SimpleJson v 3.1.3 & Python 2.6.
By for the life of me, I can not get the Margarita to start.
Says looking for flask.
please advise me
Dear Jesse,
Symbolic Links are set up, as you see in this Screenshot:
This is the Error Message when i try to start margarita:
c:\Program Files>python "c:\Program Files\margarita-master\margarita.py" -p -8089 -b 127.0.0.1 -d
Traceback (most recent call last):
File "c:\Program Files\margarita-master\margarita.py", line 17, in
from reposadolib import reposadocommon
ImportError: No module named reposadolib
Any Idea how to solve this problem?
Best regards
Thomas =)
Would love to see a one-click filter/listing of all deprecated products.
Would also love to see a separate column for the "D" "C" labels
I've set up margarita to start with a launchctl plist, and set StandardOutPath, and StandardErrorPath, but Margarita still insists on logging to system.log.
Any idea why this would be?
This is a 10.6.8 machine.
Thanks!
like a repoutil --list
great to have a GUI search field somewhere in the top margarita menubar that allows for search/display of various updates. something like the attached.
also, it'd be great if you made the margarita logo a link to the github discussion group. good times. love your work, cheers.
d
Example: I have multiple versions of Safari in my reposado. Warning Messages in repo_sync tell me that Safari-5.1.5 in branch testing is deprecated, but there is no such notification in Margarita.
Would like to be able to purge (deprecated) products.
Anybody have an opinion on this? At the level Margarita is working Bottle may be more lightweight and offer a quicker (and certainly less dependent) installation.
Bottle: http://bottlepy.org/
Just a thought about the latest Voice Updates that have flooded the software update list. Perhaps, a functionality to apply bulk actions to the filter search.
If i add an update to an branch for example 10.10.5 and click "Apple queued changes" I had to do an repo_sync to see the changes add the client side. On the browser i take a long time to see the changes if i do an refresh of the webpage then its quicker
Hey Jesse,
Been a while. I'm standing up your software for a new enterprise client. Reposado is up and running correctly and I can point clients to it. Maragarita is installed as well and allows me to add or subtract branches and display the catalogs from which i can add/subtract.
Here's a screenshot showing the terminal as I create a branch and then choose to add four patches to it. Margarita isn't showing those four patches as listed/enabled however.
margarita is located at /usr/local/bin/margarita
reposado is located at /usr/local/bin/reposado
reposado prefs are up one level at /usr/local/bin
our two symbolic links are listed as:
sysadmin$ ls -la /usr/local/bin/margarita/
lrwxr-xr-x 1 root wheel 32 Aug 11 15:27 preferences.plist -> /usr/local/bin/preferences.plist
lrwxr-xr-x 1 root wheel 40 Aug 11 15:26 reposadolib -> /usr/local/bin/reposado/code/reposadolib
Just curious if i'm missing something? i've never seen partial functionality with margarita. I've attached a screenshot so you've got a better idea as to what I'm talking about.
Cheers,
It would be nice to be able to see detail on a given update -- the equivalent of repoutil --info especially since so many updates have the same or very similar names.
These two functions have been a fantastic add on. Any chance of adding them into the main branch ?
No license is included with this software. Please update / add based on what software you have sourced or needed to include.
When I visit my Margarita (latest version from master branch) web page hosted by Apache tons of messages appear in Apache error log saying No config-data in
.
I remove all config-data with repoutil --remove-config-data all
.
Not sure if this is expected behaviour.
[Wed Apr 20 19:00:31.764567 2016] [:error] [pid 20689] No config-data in /home/reposado/html/content/downloads/37/01/031-54475/jwyjzo2lz6ox0h5pqdvi56pg3rakxsozm3/031-54475.English.dist
[Wed Apr 20 19:00:31.766007 2016] [:error] [pid 20689] No config-data in /home/reposado/html/content/downloads/14/27/031-58759/rvmnb9d04ynuxyx6a5trex1gl1zlexid58/031-58759.el.dist
.....
[Wed Apr 20 19:00:32.539359 2016] [:error] [pid 20689] {u'031-53569': False, u'031-56632': False, u'031-53826': False, u'031-53827': False, u'031-53822': False, u'031-49973': False, u'031-56504': False, u'031-54409': False, u'031-54725': False, u'031-51648': False, u'031-55710': False, u'zzz031-46045': False, u'031-56720': False, u'031-58759': False, u'031-54724': False, u'031-54475': False, u'031-20741': False, u'031-55705': False, u'031-58736': False, u'031-53817': False}
How about a button to initiate a repo_sync? Path to repo_sync could be specified in the preferences if needed.
Hello,
I have been forking this repo for a year now and adding LDAP Authentication with SSL which you can see here - https://github.com/joshua-d-miller/margarita. I was wondering if there is interest in putting this code in with the main code and maybe making a settings.py file or something similar where users can enable Margarita's LDAP Authentication and SSL.
Thanks!
I wanted to change these paths so the log files reside inside the Margarita root which is a partition /Volumes/Data/www/margarita running on Yosemite.
I've noticed after a reboot the LaunchDaemon is creating the folder /Volumes/Data/www/margarita causing my volume to mount to /Volumes/Data 1/www/margarita
I am guessing the daemon is running before the mount point is ready. Anyone else seen this behaviour?
I would expect the GUI for this would require some figuring out, but as per https://managingosx.wordpress.com/2015/01/30/gatekeeper-configuration-data-and-xprotectplistconfigdata-and-munki-and-reposado-oh-my/ it would be nice to support this. (Although #4 purging is probably the more in-demand feature...)
the list of software updates appears fine and it shows all of my branches and whats applied, but if I try to apply any queued changes, create new branches, or remove them, it will typically remove all branches.
Any idea on how to fix this? Any logs or data I can provide?
It would nice to be able to sort updates by clicking on a column header.
I realize this is way early in the game but just adding it to the list for eventual addressing.
Updates that are included in the 10.12 .sucatalog are not showing the proper OS badge when listed in Margarita.
The latest XProtect update on June 20th shows it is part of the 10.12 catalog per repoutil --info
bash-3.2# repoutil --info 031-64856
Product: 031-64856
Title: XProtectPlistConfigData
Version: 1.0
Size: 23.3 KB
Post Date: 2016-06-20 23:42:44
RestartNeeded: No
Status: Downloaded
Location: /Volumes/ExtHD/reposado/html/content/downloads/03/32/031-64856
AppleCatalogs:
http://swscan.apple.com/content/catalogs/others/index-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
http://swscan.apple.com/content/catalogs/others/index-10.11customerseed-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
https://swscan.apple.com/content/catalogs/others/index-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
Branches:
home
HTML Description:
But Margarita doesn't show that on the webpage.
Hello,
Suddenly, Margarita does not start. Here is the log.
reposado:margarita mladmin$ sudo ./margarita.py
from: can't read /var/mail/flask
from: can't read /var/mail/flask
from: can't read /var/mail/flask
./margarita.py: line 4: syntax error near unexpected token (' ./margarita.py: line 4:
app = Flask(name)'
Any help will be appreciated
Kostas
Hello,
In your readme.mnd screenshot there is a button called "Add all to xxx branch", which I do not see in my setup. I have two branches, one production and one testing.
Best regards
Kostas
It's way too easy to delete a branch. Since there is no undo, a single errant click can cause a lot of effort to be lost. I'd suggest a confirmation dialog before actually doing the delete.
I'm trying to run Margarita under Apache on a Centos 7, but I can't seem to get it to list any updates, I just get "{"branches": [], "products": []}" shown if I browse to /products. If I run this under the apache user in the flask web server the updates are populated correctly.
Anyone any ideas how I might track down what is going wrong?
Currently the list is taken away and replaced with a progress bar, however other buttons and UI elements are usable and there is no status on what is going on. To rejigger this system.
The feature to remove config data is great but it requires knowing which updates have config data. Some are obvious, like XProtect and Gatekeeper, but some sneak up, like the recent MRT configuration update. I envision it like the D = deprecated badge where C = config data. The badge would then be removed if the config data is removed from the update.
Hi all,
I would like to see Product ID too on update details row.
I did try to modify html-template, margarita.py, margarita.js but all my edits are ignored, even after stopping and restarting Margarita.
I assume that the custom webserver for Margarita hides/caches the view?
I would like to customize my view a little more but I do not know what files to mod...
-MiqViq
This has already come up on munki-dev, but margarita.py assumes that it can read the reposadolib module.
Traceback (most recent call last):
File "margarita.py", line 15, in
from reposadolib import reposadocommon
ImportError: No module named reposadolib
If I add a symlink to my reposadolib module directory at the root of the margarita installation, it works correctly. I imagine there might be a more elegant / proper way to handle this (via a config file, etc.).
In the end, my reposado user's apps folder structure looks like this:
.
├── margarita
│ ├── margarita.py
│ ├── preferences.plist -> /home/reposado/git/reposado/code/preferences.plist
│ ├── README.md
│ ├── reposadolib -> /home/reposado/git/reposado/code/reposadolib
│ ├── static
│ └── templates
└── reposado
├── code
├── docs
├── LICENSE.txt
├── other
├── README.md
└── setup.py
With Python2 deprecated, it would be good to get this updated for Python3. I managed to get some of it working (by adding paranthesis for print statements, and changing the urlparse import statement), but then it just errors out:
[Mon Apr 27 09:59:25.642587 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] [2020-04-27 09:59:25,639] ERROR in app: Exception on /products [GET]
[Mon Apr 27 09:59:25.642625 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] Traceback (most recent call last):
[Mon Apr 27 09:59:25.642629 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
[Mon Apr 27 09:59:25.642638 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] response = self.full_dispatch_request()
[Mon Apr 27 09:59:25.642641 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
[Mon Apr 27 09:59:25.642644 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] rv = self.handle_user_exception(e)
[Mon Apr 27 09:59:25.642646 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
[Mon Apr 27 09:59:25.642649 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] reraise(exc_type, exc_value, tb)
[Mon Apr 27 09:59:25.642652 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] File "/usr/local/lib64/python3.6/site-packages/flask/_compat.py", line 39, in reraise
[Mon Apr 27 09:59:25.642655 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] raise value
[Mon Apr 27 09:59:25.642658 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
[Mon Apr 27 09:59:25.642661 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] rv = self.dispatch_request()
[Mon Apr 27 09:59:25.642686 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
[Mon Apr 27 09:59:25.642690 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] return self.view_functions[rule.endpoint](**req.view_args)
[Mon Apr 27 09:59:25.642692 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] File "/usr/local/asus/margarita/margarita.py", line 146, in products
[Mon Apr 27 09:59:25.642695 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] return json_response({'products': sprodlist, 'branches': catalog_branches.keys()})
[Mon Apr 27 09:59:25.642698 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] File "/usr/local/asus/margarita/margarita.py", line 52, in json_response
[Mon Apr 27 09:59:25.642700 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] return Response(json.dumps(r), status=200, mimetype='application/json')
[Mon Apr 27 09:59:25.642703 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] File "/usr/lib64/python3.6/json/__init__.py", line 231, in dumps
[Mon Apr 27 09:59:25.642705 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] return _default_encoder.encode(obj)
[Mon Apr 27 09:59:25.642708 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] File "/usr/lib64/python3.6/json/encoder.py", line 199, in encode
[Mon Apr 27 09:59:25.642711 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] chunks = self.iterencode(o, _one_shot=True)
[Mon Apr 27 09:59:25.642722 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] File "/usr/lib64/python3.6/json/encoder.py", line 257, in iterencode
[Mon Apr 27 09:59:25.642725 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] return _iterencode(o, 0)
[Mon Apr 27 09:59:25.642728 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] File "/usr/lib64/python3.6/json/encoder.py", line 180, in default
[Mon Apr 27 09:59:25.642730 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] o.__class__.__name__)
[Mon Apr 27 09:59:25.642734 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975] TypeError: Object of type 'dict_keys' is not JSON serializable
[Mon Apr 27 09:59:25.642771 2020] [wsgi:error] [pid 41828:tid 139685827593984] [remote 10.174.12.93:59975]
Hi,
I maintain the macadmins/reposado docker container, which bundles margarita as one of the options.
It' would be helpful if we could have a release version/git tag to pin/correlate builds with.
A discussion started in #16 around icons/graphics deserved it's own separate issue (this one). See #16 for discussion and renderings and from @tallfunnyjew.
Workflow-wise, it may be an interface paradigm to load up a screenful of stuff to operate on, interact, then on the bottom right click 'submit'. the 'new branch' interface elements therefore seem out of place, and it always feels weird to use a text label for the 'submit' action.
Pardon that I'm not leading with a mockup or PR...
In lieu of releases/tags or a GUI-side update mechanism, knowing what commit version the currently running version is at would be good
I have an environment where I need to build a couple reposadories that are size limited; is there a way to get the size of a given update displayed, and ideally sorted, in the margarita UI? I'd envision it being a separate column like version and release date.
Hello,
I am intrested of localizing the web interface of Margarita in Greek. Do I have to edit the .js file or it is not that simple?
Best regards
Kostas
Hi there,
This might be more of a feature request, but it would be great if I could expand the list of updates to more than 20 lines. 20, 50 or 100 lines would be really useful to me.
If you have no plans on adding this as a feature, can you point me in the right direction as to where I could make that change within the project?
Thanks
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.