Re: [debops-users] posgresql set lc_collate
by Maciej Delmanowski
On Jul 12, dev wrote:
> Hello Maciej,
>
> thx for quick response.
Just so you're aware - you responded directly to my address; you should have
responded to the mailing list. :-) I'll copy my message to the list for
convenience of other users.
> Am 12.07.19 um 18:52 schrieb Maciej Delmanowski:
>>On Jul 12, dev wrote:
>>>since there is no forum, AFAIK, I just subscribed and hope get infos here
>>>instead of (mis)using github-issues…
>>There is no forum. I feel that creating one would add yet another place me and
>>other people would have to keep track of. Mailing list messages just come to
>>your usual mailbox, and you don't need to do anything to keep track of things.
>>
>>Although, an upgrade to Mailman 3 could probably improve the usability a bit,
>>with web-based forum-like system. But that would have to go through DebOps
>>first, so a new set of roles for Mailman, especially that mailman3 packages
>>are now available in Debian.
>
> I totally understand your point regarding the forum.
> since I have no clue about mailman3, within a forum it's just easy to search
> & find already answered questions and maybe complete configs as inspiration.
>
> why not drop the mailing list and replace it with a forum, where one can
> send mails to? just an idea…
A switch to Mailman3 would accomplish this. You can check the mailman3-users
mailing list to see how the new web interface looks like and what capabilities
it has (for example search in the archives):
https://lists.mailman3.org/mailman3/lists/mailman-users@mailman3.org/
Of course switching to it in the DebOps case would require a new set of
Ansible roles to deploy Mailman3. They will be written eventually, at some
point.
>>>Q: how to set lc_collate on postgres DB-creation?
>>Good question! At the moment the 'debops.postgresql_server' role uses the
>>'pg_createcluster' script to create new PostgreSQL clusters. There is an
>>option for setting up locale (via item.locale) parameter, but not specifically
>>collation. You can see the code here:
>>
>>https://github.com/debops/debops/blob/master/ansible/roles/debops.postgre...
>>
>>Would setting the locale suffice in your case, or do you need to set collation
>>specifically? I suppose that adding the --lc-collate parameter with default
>>the same as --locale wouldn't hurt. I'm not sure how often that option has to
>>be differently set than the locale.
>>
>>Anyway, to change the locale for all clusters, you can set in the inventory:
>>
>>#v+
>>postgresql_server__locale: 'en_US.UTF-8'
>>#v-
>>
>>For the default cluster only, at the moment the easiest way would be to
>>override the main cluster variable definition:
>>
>>#v+
>>postgresql_server__cluster_main:
>> name: 'main'
>> port: '5432'
>> locale: 'en_US.UTF-8'
>>#v-
>
> in that case, it's not about different locales & lc-collate, it's more about
> different locales/lc-collates per database
>
> at the moment, I'm working on a customers server, which also uses atlassian
> software.
>
> atlassian suggests for jira a Locale=C:
>
> /Create a database for Jira to store issues in (e.g. //|*jiradb* |//) with
> Unicode collation./
>
> | CREATE DATABASE jiradb WITH ENCODING 'UNICODE' LC_COLLATE 'C' LC_CTYPE
> 'C' TEMPLATE template0;|
>
> but for confluence: it must not be 'C':
>
> /Next, create a database (for example //|confluence|//): /
>
> * /*Owner*// is your new database user (for example //|confluenceuser|//)/
> * /*Character encoding*// must be set to //|utf8|// encoding./
> * /*Collation*//must also be set to //|utf8|//. Other collations, such
> as "C", are known to cause issues with Confluence. //
> /
>
> since unicode collation is allowed with jira, I hope that it will work for
> my customer and will report back if not.
>
> other apps, like bitbucket, crowd … don't have any recommendations on
> locales & collations.
I see. In that case, perhaps having a parameter for collation might be useful.
If nobody else makes a PR, I can look into it if you still have problems.
Cheers,
Maciej
5 years, 5 months
[debops-users] posgresql set lc_collate
by dev
hey everybody,
since there is no forum, AFAIK, I just subscribed and hope get infos
here instead of (mis)using github-issues…
Q: how to set lc_collate on postgres DB-creation?
guenter
5 years, 5 months
[debops-users] Strange behaviour with default apache and ferm roles
by Fabian Reiners
Hey @all,
currently I'm seeing weird effects of non-resolvable variables again.
I'm using Debops v1.0.1 with some cherry-picks not related to ferm and
apache2. Using the example playbook from [1] and no specific inventory
variables, I encounter the following error:
TASK [debops.apache : Create conf-available snippets]
***********************************************************************
[WARNING]: Unable to find 'lookup/ferm__fix_dependent_rules.j2' in
expected paths (use -vvvvv to see paths)
failed: [test] (item={'value': True, 'key': u'local-debops_apache'}) =>
{"ansible_loop_var": "item", "changed": false, "item": {"key":
"local-debops_apache", "value": true}, "msg": "AnsibleError: An
unhandled exception occurred while templating '{{ lookup(\"template\",
\"lookup/ferm__fix_dependent_rules.j2\", convert_data=False) | from_json
}}'. Error was a <class 'ansible.errors.AnsibleError'>, original
message: An unhandled exception occurred while running the lookup plugin
'template'. Error was a <class 'ansible.errors.AnsibleError'>, original
message: the template file lookup/ferm__fix_dependent_rules.j2 could not
be found for the lookup"}
...
As I imagine the problem is as follows:
* In this task the template
ansible-debops/ansible/roles/debops.apache/templates/etc/apache2/conf-available/local-debops_apache.conf.j2
is evaluated which has import-statements for macros
* As the imports are called "with context" Jinja2 tries to pass down the
full variable context and evaluates "ferm__fix_dependent_rules", which
has not been used before
* This obviously fails, because the referenced template could not be located
Do any of you guys have an idea on how to circumvent this error?
Maybe by making sure, that ferm__fix_dependent_rules is used in the ferm
role?
Can I prevent debops.apache from evaluating vars from debops.ferm?
Best regards
Fabian
PS: This might be a double posting, as I didn't see the email yesterday.
Sorry, if it is
[1]
https://docs.debops.org/en/latest/ansible/roles/debops.apache/getting-sta...
[2] http://jinja.pocoo.org/docs/2.10/templates/#import-context-behavior
5 years, 5 months
[debops-users] Getting started with DebOps, examples and debops-devel list
by Nicolas Quiniou-Briand
Hello DebOps users,
1. Getting started with DebOps
I'm working on an improvement [0] of the "Getting Started with DebOps"
guide [1].
What I want to do is:
- complete missing informations
- include a section to bootstrap a new host with a dedicated account
like "ansible-admin". Current guide is focused on bootstraping new host
with your local current account.
- show how to manage only some parts of your host with DebOps (for
example: I don't want to manage users)
I would like to get your input on this "plan" and know if you would like
to add other things.
What I want to do after is to cover bootstrap-ldap but in a separate guide.
2. Examples
In my opinion, something missing when you start to use DebOps are
examples. Documentation contains example but, from my point of view,
they are too generic. I would like to have some examples that covers
some uses cases like "I want to set up GitLab runner hosts with
vagrant-libvirt enabled"
My proposal is to have a list of DebOps projects in the DebOps monorepo
that cover some use cases. Two advantages:
* new users can directly reuse this examples and adapt them to fit their
needs
* we could use these examples as integration tests to test "real" use cases
3. debops-devel
I'm interested to have a debops-devel list in order to speak about
development of the DebOps project.
- [0] https://github.com/debops/debops/pull/859
- [1]
https://docs.debops.org/en/master/debops-playbooks/guides/getting-started...
Regards,
--
Nicolas Quiniou-Briand
Jabber/XMPP : nqb(a)azyx.fr
5 years, 5 months
[debops-users] Using libvirt without sudo rights
by Nicolas Quiniou-Briand
Hello,
I'm using DebOps to set up a GitLab runner with libvirt and
vagrant-libvirt in order to test applications in a GitLab pipeline.
Exactly the same way DebOps use it to test Ansible roles.
With the default configuration of roles, I'm able to start VMs through
vagrant if I adjust sudo configuration for gitlab-runner user. I don't
want to use sudo and I saw that tests under DebOps don't use it.
I'm not yet very familiar with debops.libvirtd but I'm sure there is
something to tweak in order to use libvirt without sudo privileges.
Thanks for your help.
--
Nicolas Quiniou-Briand
Jabber/XMPP : nqb(a)azyx.fr
5 years, 5 months