I try to improve our build process and use 2-3 predefined parameters for run on one single build.
Description: we have build configuration with parameters C1, C2, C3 and related build steps B1, B2, B3. They link to each other C1-B1, C2-B2, C3-B3. In this scheme all works fine, I pass parameters like mentioned here - How to pass Arguments between build configuration steps in team city?,
but I'm a bit worried because B1, B2, B3 are full copy each other and this i would like to improve it. Only one problem I couldn't find any mechanism to pass parameters from different configuration.If I use %dep. mechanism i can use parameter from only one configuration.
UPD: Currect scheme
+---+ +---+ +---+
| | | | | |
| C1| | C2| | C3|
| | | | | |
+-+-+ +-+-+ +-+-+
| | |
| | |
+-v-+ +-v-+ +-v-+
| | | | | |
| B1| | B2| | B3|
| | | | | |
+---+ +---+ +---+
the desired scheme:
+---+ +---+ +---+
| | | | | |
| C1| | C2| | C3|
| | | | | |
+-+-+ +-+-+ +-+-+
| | |
| | |
| +-v--+ |
| | | |
| | | |
+-----> B1 <----+
| |
+----+
C1, C2, C3 setup configuration parameters
B1 contains only build steps, like clean, build, dist
Could anyone help me with that? Any ideas?
In your case, you can introduce a TeamCity Metarunner. The idea is that you combine multiple build steps with parameters, and extract them as new entity, available as build runner.
See this documentation section for step by step instructions on creating a metarunner.
You can define a parameter in the template, call it, for example, external.param and give no definition.
Then, in each configuration (C1, C2 and C3) define the value of this parameter as reference to specific dependency.
external.param = %dep.<source_cfg_id>.<source_param_name>%
Related
FL - Florida,
CA - California,
US - United States
hosts.ini:
############
### CORE ###
############
[SERVERS_FL_0102]
server01-FL
server02-FL
[SERVERS_FL_0304]
server03-FL
server04-FL
[SERVERS_CA_0102]
server01-CA
server02-CA
[SERVERS_CA_0304]
server03-CA
server04-CA
############
## GROUPS ##
############
[SERVERS_FL:children]
SERVERS_FL_0102
SERVERS_FL_0304
[SERVERS_CA:children]
SERVERS_CA_0102
SERVERS_CA_0304
[SERVERS_US_0102:children]
SERVERS_FL_0102
SERVERS_CA_0102
[SERVERS_US_0304:children]
SERVERS_FL_0304
SERVERS_CA_0304
[SERVERS_US:children]
SERVERS_FL
SERVERS_CA
My question to you is: does SERVERS_US_0304 group vars file have greater precedence than SERVERS_US group vars file? For me it is difficult to say, as SERVERS_US_0304 is not inside SERVERS_US. My guess is that SERVERS_US_0304 does have greater precedence than SERVERS_US as it contains fewer groups, so it is smaller. I don't know for sure.
My question to you is: does SERVERS_US_0304 group vars file have greater precedence than SERVERS_US group vars file?
You may have a look into Understanding variable precedence and the output of
ansible-inventory -i inventory.ini --graph
#all:
|--#SERVERS_US:
| |--#SERVERS_CA:
| | |--#SERVERS_CA_0102:
| | | |--server01-CA
| | | |--server02-CA
| | |--#SERVERS_CA_0304:
| | | |--server03-CA
| | | |--server04-CA
| |--#SERVERS_FL:
| | |--#SERVERS_FL_0102:
| | | |--server01-FL
| | | |--server02-FL
| | |--#SERVERS_FL_0304:
| | | |--server03-FL
| | | |--server04-FL
|--#SERVERS_US_0102:
| |--#SERVERS_CA_0102:
| | |--server01-CA
| | |--server02-CA
| |--#SERVERS_FL_0102:
| | |--server01-FL
| | |--server02-FL
|--#SERVERS_US_0304:
| |--#SERVERS_CA_0304:
| | |--server03-CA
| | |--server04-CA
| |--#SERVERS_FL_0304:
| | |--server03-FL
| | |--server04-FL
|--#ungrouped:
... the last listed variables override all other variables ...
... Ansible gives precedence to variables that were defined more recently, more actively, and with more explicit scope. ...
If you apply tasks on the group SERVERS_US, the group var file of SERVERS_US_0304 will not be read since it is not part of the (sub)tree.
ansible-inventory -i inventory.ini SERVERS_US --graph
#SERVERS_US:
|--#SERVERS_CA:
| |--#SERVERS_CA_0102:
| | |--server01-CA
| | |--server02-CA
| |--#SERVERS_CA_0304:
| | |--server03-CA
| | |--server04-CA
|--#SERVERS_FL:
| |--#SERVERS_FL_0102:
| | |--server01-FL
| | |--server02-FL
| |--#SERVERS_FL_0304:
| | |--server03-FL
| | |--server04-FL
And so vice versa.
ansible-inventory -i inventory.ini SERVERS_US_0304 --graph
#SERVERS_US_0304:
|--#SERVERS_CA_0304:
| |--server03-CA
| |--server04-CA
|--#SERVERS_FL_0304:
| |--server03-FL
| |--server04-FL
Therefore it will somehow depend on what you try to achieve. How to build your inventory gives some examples for organizing and grouping, as well the answer about ansible_group_priority.
currently, i'm working with project that has some modules which need to run schedule job.
I want to take schedule job into Kernel of each module (not Kernel in app/Console directory).
I did like this Laravel 5 Package Scheduled Tasks but it only run on 1 module. The others did not run.
Can anybody please help me! Thanks
My source code has structure like this:
app
| Console
| | Commands
| | | Command.php
| | Kernel.php
bootstrap
...
Module
| Module 1
| | Console
| | | Commands
| | | | Command11.php
| | | | Command12.php
| | | Kernel.php
| Module 2
| | Console
| | | Commands
| | | | Command21.php
| | | | Command22.php
| | | Kernel.php
We develop a spring-boot application which is deployed on OpenShift 3. The application should be scalable to at least two pods. But we use internal caches and other "global" data (some lists, some maps...) which should be the same (i.e. shared) for all the pods.
Is there a way to achieve such data sharing by a) a service, which is embedded inside the spring-boot application itself (this implies that each pod needs to find/know each other) or does it b) need in every case a standalone (potentially also scalable) cache service?
a)
|---- Application ----|
| |
| |-------------| |
| | Pod 1 | * | |
| |----------^--| |
| | |
| |----------v--| |
| | Pod 2 | * | |
| |----------^--| |
| | |
| |----------v--| |
| | Pod n | * | |
| |-------------| |
| |
|----------------------
* "embedded cache service"
b)
|---- Application ----|
| |
| |-------------| |
| | Pod 1 | |-----\
| |-------------| | \
| | | \
| |-------------| | \ |-----------------------|
| | Pod 2 | |-----------| Cache Service/Cluster |
| |-------------| | / |-----------------------|
| | | /
| |-------------| | /
| | Pod n | |------/
| |-------------| |
| |
|----------------------
Typically, if we would use memcached or redis I think b) would be the only solution. But how is it with Hazlecast?
With Hazelcast, you can both use a & b.
For scenario a, assuming you're using k8s on OpenShift, you can use Hazelcast Kubernetes discovery plugin so that pods deployed in the same k8s cluster discover themselves & form a cluster: https://github.com/hazelcast/hazelcast-kubernetes
For scenario b, Hazelcast has an OpenShift image as well, which requires an Enterprise subscription: https://github.com/hazelcast/hazelcast-openshift. If you need open-source version, you can use Hazelcast Helm Chart to deploy data cluster separately: https://github.com/helm/charts/tree/master/stable/hazelcast
I have an array in sphinx / rst, and I would like to reference a line or cell from other part of my documentation.
How can I create an inline markup reference target in the array?
The array looks like this:
+-----------------+-------------------------+-------------------------------------------------------+
| e | c | p |
+=================+=========================+=======================================================+
| e1 | c1 | p1 |
+-----------------+-------------------------+-------------------------------------------------------+
| e2 | c2 | p2 |
+-----------------+-------------------------+-------------------------------------------------------+
I did not think this was possible, but this worked for me.
+----+----+-------------------------+
| e | c | .. _my-reference-label: |
| | | |
| | | p |
+====+====+=========================+
| e1 | c1 | p1 |
+----+----+-------------------------+
| e2 | c2 | p2 |
+----+----+-------------------------+
and then the link to the target would be:
:ref:`Link title <my-reference-label>`.
The formatting makes the targeted cell larger than it should be, but you can fiddle with the other column widths to get percentage widths close enough.
I am working with JasperReports 4.5.0, Spring 3.0.5 RELEASE. I am exporting my JR report in pdf, html, csv formats. With pdf, html the report is generating fine.
But when i am exporting my report in csv it is displaying all the fields and values in one column only. My code flow is exactly like this link.
Below is the example how I am getting now.
| A | B | C | D |
|S.No,IPAddress,TotalDuration,TotalBdrCount | | | |
|1,null,266082,null | | | |
2,null,null,null | | | |
3,null,null,null | | | |
4,null,null,null | | | |
Where S.No,IPAddress,TotalDuration,TotalBdrCount are the column headers and 1,null,266082,null are the values to the respective columns.
But my requirement is
| A | B | C | D |
| S.No | IPAddress | TotalDuration | TotalBdrCount |
I think you understood my problem. For this am i need to set any parameters? I am not getting. Can any one help me out regarding this issue.