More

Examples of config.yaml for printing


I've been reading this, I wonder if there are config.yaml nice examples available to take a look at them.

Can some web links for the examples or output images be provided for this?


I don't know any printing module demo with several differentconfig.yamlto choose from. I would recommend to start by the examples provided in the mapfish print GitHub repository.


An amazing recipe is given in the nginx Dockerfile:

Simply, the app can continue writing to it as a file, but as a result the lines will go to stdout & stderr !

For a background process in a docker container, e.g. connecting with exec to /bin/bash I was able to use.

This sends the output to the stdout of pid 1, which is the one docker pickups up.

In another question, Kill child process when the parent exits, I got the response that helped to sort this out.

This way, we configure the application so it logs to a file, and continuously tail -f it. Luckily, tail can accept --pid PID : it will exit when the specified process exits. We put $ there: PID of the current shell.

As a final step, the launched application is exec 'ed, which means that the current shell is completely replaced with that application.

Runner script, run.sh , will look like this:

NOTE: by using tail -F we list filenames, and it will read them even if they appear later!

Finally, the minimalistic Dockerfile:

Note: to workaroung some extremely strange tail -f behavior (which says "has been replaced with a remote file. giving up on this name") i tried another approach: all known log files are created & truncated on start up: this way I ensure they exist, and only then -- tail them:


Configuring printing of the mapĀ¶

This section describes how to configure the options to print maps. Printing a map generates a pdf file on the server which is downloaded by the client to be send to a printer. During pdf creation map data is downloaded from various sources to be included in the pdf.

GeoNetwork needs to be able to access the external resource. Set up a webproxy in system settings if your network requires a webproxy to be set up to access the internet.

Locate the file WEB-INF/config-print/print-config.yaml , this configuration file has a lot of options to customise the print options. Read more about the various parameters at http://www.mapfish.org/doc/print/configuration.html

The folder contains 3 template files:

template.pdf and template-landscape.pdf which are used to generate the map viewer pdf

template-thumbnail.pdf which is used to build a thumbnail in the metadata editor (see Generating a thumbnail using WMS layers ).

These templates are created by exporting pdf from the included template.odf file in the folder.

© Copyright 2001-2021, GeoNetwork opensource. Licensed under Creative Commons Attribution ShareAlike (Unported) v3.0 License.


Upload certificates to Azure Key Vault

To store our certificates securely and make them accessible from multiple devices, we'll upload the certificates into Azure Key Vault. As you can see from the preceding list, we have two types of certificate files: PFX and PEM. We'll treat the PFX file as Key Vault certificates to be uploaded to Key Vault. The PEM files are plain text, and we'll treat them as Key Vault secrets. We'll use the Key Vault instance associated with the Azure Machine Learning workspace we created by running the Jupyter notebooks.

From the Azure portal, go to your Azure Machine Learning workspace.

From the overview page of the Machine Learning workspace, find the name for Key Vault.

On your development machine, upload the certificates to Key Vault. Replace <subscriptionId> and <keyvaultname> with your resource information.

If you're prompted, sign in to Azure.

The script will run for a few minutes with output that lists the new Key Vault entries.


Pyethapp port forwarding and configuration help?

I'm trying to setup an ethereum node on my raspberry pi using pyethapp as the client.

I was wondering if allowing port forwarded inbound connections would help to make my node more useful to the network, however I can't find any documentation about it in the docs, in fact they are quite scarce. If someone could point me to an example config.yaml file or an page with some configuration options for the python client (such as changing the default listening port) I would be very grateful.

I know bitcoin encourages all nodes to port forward 8333, and a few sources say that the default port ethereum uses is 30303, but I can't find any information that suggests that this is the case for the python client (as oppose to the more mainstream go client) and if there is point bothering with port forwarding at all.


What is the proper way to modify kubelet and control-plane configuration with kubeadm?

However I'm not entirely sure what is the proper way of making these changes.

Looking at /etc/systemd/system/kubelet.service.d/10-kubeadm.conf there is a reference to /etc/default/kubelet but it's considered a last resort and recommends updating .NodeRegistration.KubeletExtraArgs instead:

Where is this .NodeRegistration.KubeletExtraArgs and how do I change it for all nodes in the cluster?

control-plane

From what I understand the apiserver and controller-manager are run as static pods on each master and reading their configuration from /etc/kubernetes/manifests/kube-<type>.yaml . My first thought was to make necessary changes to these files, however according to the kubernetes docs on upgrading a kubeadm cluster, kubeadm will:

Because I've changed the manifests manually they are not updated in the ClusterConfiguration ( kubectl -n kube-system get cm kubeadm-config -o yaml ), would my changes survive an upgrade this way? I suppose I could also edit the ClusterConfiguration manually with kubeadm edit cm . but this seems error prone and it's easy to forget changing it every time.

According to the docs there is a way to customize control-plane configuration but that seems to be only when installing the cluster for the first time. For example, kubeadm config print init-defaults as the name suggests only give me the default values, not what's currently running in the cluster. Attempting to extract the ClusterConfiguration from kubectl -n kube-system get cm kubeadm-config -o yaml and run kubeadm init --config <config> fails in all kind of ways because the cluster is already initialized.

Kubeadm can run init phase control-plane which updates the static pod manifests but leaves the ClusterConfiguration untouched, so I would need to run the upload-config phase as well.

Based on the above, the workflow seems to be

  • Extract the ClusterConfiguration from kubeadm -n kube-system get cm kubeadm-config and save it to a yaml file
  • Modify the yaml file with whatever changes you need
  • Apply changes with kubeadm init phase control-plane all --config <yaml>
  • Upload modified config kubeadm init phase upload-config all --config <yaml>
  • Distribute the modified yaml file to all masters
  • For each master, apply with kubeadm init phase control-plane all --config <yaml>

What I'm concerned about here is the apparent disconnect between the static pod manifests and the ClusterConfiguration. Changes aren't made particularly often so it's quite easy to forget that changing in one place also require changes in the other - manually.

Is there no way of updating the kubelet and control-plane settings that ensure consistency between the kubernetes components and kubeadm? I'm still quite new to Kubernetes and there is a lot of documentation around it so I'm sorry if I've missed something obvious here.


Pimcore Mail

The PimcoreMail Class extends the SymfonyComponentMimeEmail Class and adds some features for the usage with Pimcore.

If email settings are configured in your config/config.yaml then on initializing
PimcoreMail object, these settings applied automatically.

It is recommended to configure email settings in config/config.yaml file:

and debug email addresses should be configured in Admin Settings > System > Debug > Debug Email Addresses.

If the Debug Mode is enabled, all emails will be sent to the Debug Email recipients defined in Settings > System > Debug > Debug Email Addresses. Additionally the debug information (to whom the email would have been sent) is appended to the email and the Subject contains the prefix "Debug email:".

This is done by extending Symfony Mailer, with injected service RedirectingPlugin , which calls beforeSendPerformed before mail is sent and sendPerformed immediately after email is sent.

Emails are sent via transport and PimcoreMailer requires transports: main for sending emails and pimcore_newsletter for sending newsletters(if newsletter specific settings are used), which needs to be configured in your config.yml e.g.,

Please refer to the Transport Setup for further details on how this can be set up.

The PimcoreMail Class automatically takes care of the nasty stuff (embedding CSS, normalizing URLs and Twig expressions . ). Note that all CSS files are embedded to the html with a <style> tag because the image paths are also normalised.


AWS Cloud Provider Integration with Kubernetes - Nodes stuck with &ldquouninitialized: true&rdquo taint after bootstrapping

I am attempting to bootstrap a Kubernetes cluster on AWS using Kubeadm. Please before you suggest them, I am not interested in using EKS or another bootstrapping solution like Kops, Kubespray, etc.

It appears that there is a lot of inaccurate information about the proper procedures out there due to a schism with respect to Cloud Provider integrations not being managed out of tree rather in-tree. So I've been struggling to get a clear picture in my head about how to properly set this integration up.

The Requirements

The official repo indicates three requirements.

1) You must initialize kubelet , kube-apiserver , and kube-controller-manager with the --cloud-provider=external argument. If I understand things correctly, this allows you to use the out of tree provider. Using aws here instead would use the in-tree provider which is on a deprecation timeline.

2) You must create two IAM policies, associate them with IAM Instance Profiles, and launch your Kubernetes nodes with said policy attached.

3) Each node in the cluster must have the same hostname that is associated with the underlying EC2 instance as its Private DNS name.

In addition to this, I believe it was once required to attach the following Tags to your EC2 instances, Route Tables, Security Groups, and Subnets. Which I have done for good measure as well:

The Problem

Despite this, however, when my worker nodes come online after bootstrapping they have the following taint applied:

This obviously implies that the nodes have not been initialized by the Cloud Provider. I'm not really sure where to go from here. There is an open request for additional instructions on how to use the Cloud Provider integration with AWS but it is currently unsatisfied.

My Configuration

You might have noticed I left a comment on that issue detailing my issue as well. Here is a summary of the details of my environment showing that I should be in compliance with the listed requirements.

1) My Kubeadm config files set the cloud provider to external in four places

KubeletConfiguration and InitConfiguration

2) My EC2 instances were launched with an instance profile with the IAM policies outlined in the README:

3) The hostnames are the EC2 Private DNS names:

4) The EC2 instances as well as my route tables, subnets, etc are tagged with:

As a result, it looks like I am in compliance with all of the requirements so I am unsure why my nodes are still left with that Taint. Any help would be greatly appreciated!

I have updated the tags on each instance to:

And added this tag to each Subnet:

This has not resolved the situation, however.

EDIT 2

A user elsewhere suggested that the issue may be that I didn't apply the RBAC and DaemonSet resources present in the manifests directory of the cloud-provider-aws repo. After doing so using this image, I can confirm that this has NOT resolved my issue since the aws-cloud-controller-manager appears to expect you to be using aws not external` as per the logs produced by the pod on startup:

EDIT 3

I built a new image using the repo as of commit 6a14c81 . It can be found here. It appears to also be using the aws provider by default?


Arbiter Installation on OpenStack

Cinder Volumes, only for ISO (SVN and mongo are not needed) are created

Access and Security (22 and mongo port 27717 to 27720 are opened as per deployment)

If you want to add the MongoDB authentication, you need to enable dbAuthenticationEnabled parameter. For more information refer to Configuration Parameters - HA System section in CPS Installation Guide for OpenStack . You need to mention password for all the sites separately using API and that must be same for all the sites.

nova flavor-create --ephemeral 0 arbiter auto 4096 0 2

Create arbiter-cloud.cfg file with the following content:

NoteEdit IPADDR/NETMASK/NETWORK/GATEWAY and remove the hint information while using the cloud-config file. For example, internal network information and so on.

Before executing nova boot command, confirm that the cloud configuration file ( arbiter-cloud.cfg ) exists in the right directory.

Execute the following command to create arbiter VM with two NICs:

The following examples can be used to get the internal and management IP addresses and volume IDs which are used to spin arbiter VM.

id name subnet
9c89df81-90bf-45bc-a663-e8f80a8c4543 internal 682eea79-6eb4-49db-8246-3d94087dd487 172.16.2.0/24
8d60ae2f-314a-4756-975f-93769b48b8bd gx 9f3af6b8-4b66-41ce-9f4f-c3016154e027 192.168.2.0/24
dd65a7ee-24c8-47ff-8860-13e66c0c966e management a18d5329-1ee9-4a9e-85b5-c381d9c53eae 172.18.11.0/24

For the kernel upgrade, once the Arbiter deployment is complete and the output of diagnostics.sh command displays no errors, execute the following command from Cluster Manager to ensure that the kernel version is upgraded.

This command will prompt for reboot choice. Please select Y for the same and proceed.


2 Answers 2

So far it's looking quite good, but I have a few comments:

In my opinion it would be better to pass the File to load in to the constructor of this Config class, for flexibility. Now perhaps you only need to load a specific file, but in the future you might want to support multiple files. Who says that you always want to load config.yaml ? Sometimes you might want to try different configurations, and instead of making backups of your config file and renaming files like crazy, you could instead load config-withsomespecials.yaml

Speaking of flexibility, your setDefaults class works fine for your server, but you could make your Config class an abstract class, setDefaults as an abstract method and use a ServerConfig as a subclass in which you override this method:

These are only suggestions, if you don't want to make it that flexible, that's up to you.

<personal-opinion> As for the choice of using YAML. it isn't exactly my favorite format. Let me guess, you're a Minecraft / Bukkit player? The Minecraft / Bukkit world is about the only place I've come across this format. If you have the ability to choose, I would personally recommend using Jackson, which is primarily used for JSON, although it has support for XML and even support for YAML. Jackson is wildly used, very flexible, and I think it is more well-documented than Snakeyaml. </personal-opinion>


Configuring printing of the mapĀ¶

This section describes how to configure the options to print maps. Printing a map generates a pdf file on the server which is downloaded by the client to be send to a printer. During pdf creation map data is downloaded from various sources to be included in the pdf.

GeoNetwork needs to be able to access the external resource. Set up a webproxy in system settings if your network requires a webproxy to be set up to access the internet.

Locate the file WEB-INF/config-print/print-config.yaml , this configuration file has a lot of options to customise the print options. Read more about the various parameters at http://www.mapfish.org/doc/print/configuration.html

The folder contains 3 template files:

template.pdf and template-landscape.pdf which are used to generate the map viewer pdf

template-thumbnail.pdf which is used to build a thumbnail in the metadata editor (see Generating a thumbnail using WMS layers ).

These templates are created by exporting pdf from the included template.odf file in the folder.

© Copyright 2001-2021, GeoNetwork opensource. Licensed under Creative Commons Attribution ShareAlike (Unported) v3.0 License.