[ckan-dev] Script configuring production.ini using paster config-tool
Antal Buss
antal.buss at edmonton.ca
Mon Oct 29 16:44:37 UTC 2018
I got mixed results with ckanext-envvars. For some extensions work for some
others not.
I am using config-tool to the extensions that does not work with
ckanext-envvars:
docker exec -it -u root ckan ckan-paster --plugin=ckan config-tool
/etc/ckan/default/production.ini "key = value"
where *ckan-paster* is a link inside the container pointing to
/usr/lib/ckan/default/bin/paster
Best
On Mon, Oct 29, 2018 at 7:49 AM Gavin Cannizzaro <gcannizzaro at mindgrub.com>
wrote:
> If I'm understanding your question correctly, I'd be interested as well.
>
> We ended up pre-processing the ini file using sed during the Docker
> entrypoint. I had no luck at all with the ckanext-envvars package, which
> appears to be for a similar purpose (again, if I'm understanding correctly).
>
> https://github.com/okfn/ckanext-envvars
>
> I filed an issue about it but got no reply.
>
> https://github.com/okfn/ckanext-envvars/issues/2
>
>
> On Mon, Oct 29, 2018 at 9:37 AM, Terje Christensen <terje at businessmodel.io
> > wrote:
>
>> Hi
>> I'm setting up a development version of ckan using docker. Adding the
>> extra extensions I need in the Dockerfile.
>>
>> this works just fine. But I would also like to add the extensions that is
>> installed to the config file (production.ini).
>>
>> I see that there is code that seems to do this. In ckan/lib/cli.py at
>> line 2448 there are a class ConfigToolCommand.
>> Examples:
>> paster config-tool default.ini sqlalchemy.url=123
>> 'ckan.site_title=ABC'
>>
>> How can I use config-tool to set variables?
>>
>> I have tried
>> 1) log into the docker instance running ckan
>> docker exec -it ckan /bin/bash
>>
>> 2) run the paster command
>> /usr/local/bin/ckan-paster config-tool /etc/ckan/production.ini
>> 'ckan.site_title=ABC'
>>
>> 3) result is
>> Command 'config-tool' not known (you may need to run setup.py egg_info)
>> Known commands:
>> create Create the file layout for a Python distribution
>> exe Run #! executable files
>> help Display help
>> make-config Install a package and create a fresh config file/directory
>> points Show information about entry points
>> post Run a request for the described application
>> request Run a request for the described application
>> serve Serve the described application
>> setup-app Setup an application, given a config file
>>
>> Terje
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>
>>
>
>
> --
> ------------------------------
> [image: Mindgrub Technologies, LLC.] <http://www.mindgrub.com/> [image:
> Inc. Best Workplaces Award]
> <http://www.mindgrub.com/news/mindgrub-one-inc-magazine-s-best-places-work>
> Gavin Cannizzaro
> Lead Software Engineer
> OFFICE 410.988.2444
> DIRECT 410.988.2444
> MOBILE 410.988.2444
> www.mindgrub.com
> This message (including any attachments) contains confidential information
> intended for a specific individual and purpose, and is protected by law. If
> you are not the intended recipient, you should delete this message and are
> hereby notified that any disclosure, copying, or distribution of this
> message, or the taking of any action based on it, is strictly prohibited.
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
--
Antal Buss
DATA ENGINEER
ANALYTICS CENTRE OF EXCELLENCE
FINANCIAL AND CORPORATE SERVICES | OPEN CITY AND TECHNOLOGY
780-423 7449 OFFICE
antal.buss at edmonton.ca
City of Edmonton
1700 Century Place
9803 102A Ave NW
Edmonton AB T5J 3A3
All information contained in this email post is proprietary to the City of
Edmonton, confidential and intended only for the addressed recipient. If
you have received this post in error, please disregard the contents, inform
the sender of the misdirection, and remove it from your system. The
copying, dissemination or distribution of this email, if misdirected, is
strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20181029/289f8f60/attachment-0002.html>
More information about the ckan-dev
mailing list