Commit Graph

77 Commits

Author SHA1 Message Date
Scott Little bcbe18004a Remove CentOS/OpenSUSE build support
StarlingX stopped supporting CentOS builds in the after release 7.0.
This update will strip CentOS from our code base.  It will also remove
references to the failed OpenSUSE feature as well.

Story: 2011110
Task: 49958
Change-Id: I7fe10de6fd71701f142c8416b91cac3a338bf740
Signed-off-by: Scott Little <scott.little@windriver.com>
2024-04-26 14:14:09 -04:00
Davlet Panech b1e7cce32f Fix github mirroring for this repo
Updating the rsa ssh host key based on:
https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/

Note: In the future, StarlingX should have a zuul job and
secret setup for all repos so we do not need to do this
for every repo.

Needed to rename the secret, because zuul fails if like-named
secrets have diffent values in different branches of the same
repo.

Partial-Bug: #2015246
Change-Id: I37b44a091fbd9c820c6047627906d05dadbcdd23
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
2023-04-28 12:38:52 -04:00
Al Bailey a2e3c4b0f1 Update tox.ini to work with tox 4
This change will allow this repo to pass zuul now
that this has merged:
https://review.opendev.org/c/zuul/zuul-jobs/+/866943

Tox 4 deprecated whitelist_externals.
Replace whitelist_externals with allowlist_externals

Partial-Bug: #2000399

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: Icf70dcde638cb86683e9dd6e6a96e0d2a2309438
2022-12-26 23:31:43 +00:00
Davlet Panech 30db482b57 Add *_helm.inc files
Add missing {centos,debian}_helm.inc files used by scripts in
build-tools. The centos file used to reside in starlingx/config repo,
but it really belongs here.

TESTS
======================================

Build packages, then run build-helm-charts.sh and make sure
"stx-monitor-helm" tarball is generated.

Story: 2010226
Task: 46419

Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: Idc888781963b5387f397c0645db3080ca0582df3
2022-09-26 14:08:25 -04:00
Davlet Panech a323160dc4 Convert helm chart packages to arch-independent
Helm chart DEB packages: change target arch from "all" to "any" (ie
arch-independent). This is required for starlingx debian tools to work
correctly.

Story: 2010226
Task: 46405

Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: I83fa678f0195442b97010408b60fba11fccc2647
2022-09-23 10:27:19 -04:00
Zuul 1eab19afaa Merge "monitor-helm: remove dl_hook" 2022-01-13 22:49:26 +00:00
Yue Tao b6dbc770fc monitor-helm-elastic: remove dl_hook
Use debian method to apply local patches instead of patching in rules.

Add "dl_path" and "src_files" in meta_data.yaml to download tarball and
copy local files.

No need dl_hook

Test Plan:

Pass: successfully build monitor-helm-elastic.
Pass: No difference comparing with the result of dl_hook

Story: 2009101
Task: 43838

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Change-Id: I068f3ae0cbf9e0661abc12adcec005be145f2462
2022-01-13 10:54:50 +08:00
Yue Tao b2add48f64 monitor-helm: remove dl_hook
Use debian method to apply local patches instead of patching in rules.

Add "dl_path" and "src_files" in meta_data.yaml to download tarball and
copy local files.

No need dl_hook

Test Plan:

Pass: successfully build monitor-helm.
Pass: No difference comparing with the result of dl_hook

Story: 2009101
Task: 43838

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Change-Id: I441540b54e27f63d8a84d3a83f65679dc6dfaf4b
2022-01-13 10:42:14 +08:00
Tracey Bogue cd71553493 Add Debian packaging for monitor app
Create Debian packages for monitor-helm, monitor-helm-elastic and
stx-monitor-helm packages.

Story: 2009101
Task: 43838

Signed-off-by: Tracey Bogue <tracey.bogue@windriver.com>
Change-Id: I454c69618975324feec4834ea065c0025a9381d1
2021-12-02 10:13:10 -06:00
Scott Little 98f03a1dc0 Add debian_build_layer.cfg file
Story: 2008862

Task: 43154
Signed-off-by: Scott Little <scott.little@windriver.com>
Change-Id: Icfd8e6f257fa2ab8ca5b978621e0b11709836a43
2021-10-05 14:08:27 -04:00
Don Penney cc0fe433b4 Add auto-version for remaining stx/monitor-armada-app packages
Update remaining StarlingX packages with hardcoded TIS_PATCH_VER to
use PKG_GITREVCOUNT where possible, with offsets as needed to ensure
the version is incremented above the hardcoded version.

Story: 2008455
Task: 41462
Signed-off-by: Don Penney <don.penney@windriver.com>
Change-Id: I63186d0561e47cb55f40856a4e01ff02f34406f3
2020-12-17 13:25:55 -05:00
Zuul 3bb54aad85 Merge "Fix monitor-helm* specfiles for new tarballs" 2020-07-10 22:14:56 +00:00
Saul Wold 3d8669b6e9 Fix monitor-helm* specfiles for new tarballs
Newer tarballs generated from github contain a different top-level
directory than what are currently contained in the CENGN mirror cache.
By parsing the first entry in the tarball we can figure out the
proper directory.

Tested by building both the new and old tarballs and verifing the
RPM builds correctly and the log file has correct directory.

Change-Id: Ie484cb2f5c615917afd320749ab3e68c8f7a8daa
Closes-Bug: 1857049
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2020-05-21 03:31:45 +00:00
Jim Gauld ebc6c72214 Add support for Helm v3
This adds support for Helm v3.
- 'helm init' and initialization is no longer required
- 'chartmuseum' is used as a drop-in replacement for 'helm serv'
- all Charts require the tag: apiVersion: v1 (or v2)

This updates nginx-ingress chart to specify apiVersion.

Change-Id: I6d084dafccbbc192ba5e1f5a998540e2728c9e22
Story: 2007000
Task: 39328
Depends-On: https://review.opendev.org/719962
Signed-off-by: Jim Gauld <james.gauld@windriver.com>
2020-05-12 14:32:59 -04:00
Matt Peters c6147a836a Add logstash ingress helm template
Add support for configuring logstash ingress rules
for the logstash service.

Story: 2007221
Task: 39560

Change-Id: If78635667e1acfe171e48aa106d5f31ff3cdb9b2
Signed-off-by: Matt Peters <matt.peters@windriver.com>
2020-04-26 07:57:21 -05:00
Matt Peters 502b653768 Update Logstash to use NodePort Ingress
Logstash should not be using a custom port for collectd
input from the K8s NodePort range since it might cause a
conflict if the port is allocated to another service.
Therefore, logstash will use a proper NodePort value
reserved by the nginx-ingress service.

Remove hostNetworking from Logstash since it is no longer
required.

Add support for specifying a helm nodePort value for TCP/UDP
services exposed for the nginx-ingress controller.

Story: 2007221
Task: 39544

Change-Id: Ifdb750a578ad6a5e7b96019e7caf6fe1231fa1be
Signed-off-by: Matt Peters <matt.peters@windriver.com>
2020-04-23 19:50:03 -05:00
Simon Cousineau 6f249ae424 Fix Elasticsearch readiness probe http endpoint
The readiness probe endpoint was changed in the 7.6.0 chart update. This
prevents the application from being reapplied after being removed since
elasticsearch stores its state in the persistent volume, meaning that
when it is reapplied it will try and fail to achieve quorum. Changing
the readiness probe to make a local healthcheck lets it advance to the
next master pod, instead of getting stuck on the first master pod.

Story: 2007221
Task: 39491

Change-Id: I720cec5a7a50a0207669258b97497aba9c99efee
Signed-off-by: Simon Cousineau <Simon.Cousineau@windriver.com>
2020-04-21 12:34:39 -04:00
Simon Cousineau d0190a4cc1 Fix esConfig checksum annotation
This allows restart when elasticsearch configmap changes.

Change-Id: Ic16bc98fc3fa3d39d8448965a3b3463c03372d27
Signed-off-by: Simon Cousineau <Simon.Cousineau@windriver.com>
2020-04-16 13:13:14 -04:00
Simon Cousineau 64269d4f1b Add hostNetworking parameter to logstash config
This change enables Logstash to receive collectd logs.

Change-Id: Id25138f7f153b38ef6db362f0390325ad6f58729
Signed-off-by: Simon Cousineau <Simon.Cousineau@windriver.com>
2020-04-16 10:07:59 -04:00
Zuul f1391c51bd Merge "Container logs collected without Kubernetes metadata" 2020-04-14 17:58:59 +00:00
Simon Cousineau 442ddcba07 Add updateStrategy parameter to beats configs
This change allows us to define additional parameters for the
metricbeat and filebeat updateStrategy configs.

Change-Id: Ie586ad21311f743a3ee7b2da911b0d01361daca5
Signed-off-by: Simon Cousineau <Simon.Cousineau@windriver.com>
2020-04-14 13:11:50 -04:00
Simon Cousineau 2f5215f29b Container logs collected without Kubernetes metadata
Container logs were being collected directly from the 'log' input.
Container logs are now being collected using Filebeat's 'container'
input, which adds the Kubernetes meta-data to the logs.

Change-Id: I8f1e01442ee4d52c2882ae4bfd3529cc2891f075
Signed-off-by: Simon Cousineau <Simon.Cousineau@windriver.com>
2020-04-13 11:29:57 -04:00
Simon Cousineau f97b837f49 Add command and args parameters to beats and logstash
Task: 39337

Change-Id: If35ea14aabe10ecfd017648a1c40b2c5917d6c13
Signed-off-by: Simon Cousineau <Simon.Cousineau@windriver.com>
2020-04-08 15:29:53 -04:00
Simon Cousineau d1ee1b4c3b Metricbeat nodeSelector and tolerations config
Add support for different nodeSelector and tolerations configs for
metricbeat daemonset and deployment.

Story: 2007221
Task: 39335
Change-Id: I1e96dffac42bf746451618be3da6dcfb21f389c2
Signed-off-by: Simon Cousineau <Simon.Cousineau@windriver.com>
2020-04-08 12:11:30 -04:00
Simon Cousineau b3169efa35 Update Elastic helm-charts to 7.6.0 release
Updated stx-monitor to use official Elastic 7.6.0 helm-charts for Kibana,
Filebeat, Metricbeat and Logstash.
This change included updating the helm-elastic tarball sha to the newest
release and updating helm-elastic patches accordingly. Patched the
charts to support previous stx-monitor functionality and updated the
manifest to conform to the new config format.

Change-Id: I03b356b2b7acda0fc8336704784bd870252dd5b8
2020-04-06 18:12:14 -04:00
Kevin Smith 4e1bf7971e stx-monitor logstash template change
Default to using the same image as the main container
in logstash extra init containers so that the same docker
registry as the main container image can be used.

Closes-Bug: 1869256
Change-Id: I0555c31208f25146ba74b1a7b2f926abaf31e060
Signed-off-by: Kevin Smith <kevin.smith@windriver.com>
2020-03-26 16:31:19 -04:00
Kevin Smith bdfd8a2abd stx-monitor elasticsearch readiness probe enhancements
Modify the readiness probe in the elasticsearch chart so that
2 sets of cluster health parameters can be set.  One set of cluster
health parameters will be used when no connection to the master
is possible or there are less than 2 elasticsearch data nodes in the
cluster.  The other will be used when connection to the master is
possible and 2 or more elasticsearch data nodes are present in the
cluster.

This is necessary as in various cluster recovery scenarios and AIO-SX
only local node health should be checked, whereas when modifying
elasticsearch data nodes we need to ensure no recovery is in progress
before advancing to updating the next data node.

Change-Id: I8125c3c5b87e081a00907c519e3d513c74031c70
Closes-Bug: 1869001
Signed-off-by: Kevin Smith <kevin.smith@windriver.com>
2020-03-25 09:27:15 -04:00
Matt Peters 687fb8584f Propagate host mount changes to metricbeat container
The metricbeat pod requests a hostPath volume which mounts the
rootfs of the host into the container.  This is required for
metricbeat to read the filesystem usage from within the container.
The rootfs mount is also bind mounting all subpath mounts within the
container which includes the DRBD filesystems.  When SM attempts
to unmount the DRBD filesystems as part of the swact operation, the
metricbeat container is still holding on to the mounted filesystems,
preventing the DRBD devices to be shutdown.

To address this, the metricbeat container will specify the mount
propagation so that any changes to the host filesystem are also
reflected inside the container.  This will ensure that when the host
performs the unmount, the container will also release the mount
reference.

In the future, security policies should be added to ensure other
application containers do not perform host mount operations without
having the necessary privileges to access the host filesystem.

Change-Id: I43c6dcbe6a438b357532263be5b04f122b587c70
Closes-Bug: 1866099
Signed-off-by: Matt Peters <matt.peters@windriver.com>
2020-03-12 14:09:51 -04:00
Bin Qian 03c2d97364 Trigger upload job to upload repo to GitHub
Trigger upload job to upload repo to GitHub
Story: 2007252
Task: 38687

Change-Id: I48c0c967df9a026790f825d9780117e066293ccd
Signed-off-by: Bin Qian <bin.qian@windriver.com>
2020-02-07 11:12:36 -05:00
Bin Qian 252f8708c7 Adding job to upload commits to GitHub
Add job to publish monitor-armada-app repo to GitHub

Change-Id: I24354410f1a3b973b4a44d799170828e07b7bc85
Story: 2007252
Task: 38687
Signed-off-by: Bin Qian <bin.qian@windriver.com>
2020-02-06 11:56:27 -05:00
Zuul da6f26b4b1 Merge "Stx-monitor: add setup script flexibility" 2020-01-27 22:26:11 +00:00
Angie Wang 56e309f772 Add missing imagePullSecrets overrides for monitor app
Clean up the Add-imagePullSecrets.patch to remove redundant
imagePullSecrets.

Update manifest with correct imagePullSecrets overrides in
order to allow stx-monitor to pull images from local docker
registry on each node.

stx-monitor app applied successfully and verified that each
running pod has the following in its spec:
imagePullSecrets:
  - name: default-registry-key

Change-Id: I330004bd44b255a46e2d1fb29ada63dbcd46e881
Closes-Bug: 1860132
Signed-off-by: Angie Wang <angie.wang@windriver.com>
2020-01-24 10:49:33 -05:00
Kevin Smith 2e89eb368a Stx-monitor: add setup script flexibility
Move the beats setup scripts to the values files so they can be
overridden.

Additionally, set the maxUnavailable parameter for the elasticsearch
charts so that a maximum of one pod at a time will be down
when the application is re-applied or upgraded.

Change-Id: I1362788dae30424f1e7afe452a3ca3b5a306b94c
Closes-Bug: 1860696
Signed-off-by: Kevin Smith <kevin.smith@windriver.com>
2020-01-23 12:52:13 -05:00
Abdelfattah Saafan 757fc67c25 Add rbac replicasets to apps apigroup
Metricbeat couldn't collect state_replicaset due to the missing RBAC role definition
so replicasets was needed in apps apigroup.

This change is based on:
122647b905

Change-Id: Id0be124971820ccf91735d3f40cdc75d96fa57d4
Closes-Bug: 1860532
Signed-off-by: Abdelfattah Saafan <abdelfattah.saafan@windriver.com>
2020-01-22 13:13:25 -05:00
Kevin Smith f6010f4ed2 Remove unused image references from monitor app
Remove all references to images that are not used by the app
to prevent downloading them. Removals include images for
testing kibana and enabling logstash exporter.

Also explicitly add a reference to the nginx defaultbackend image
in the manifest as it fails to appear in the image download
list in the application images yaml file.  This is possibly an
image parsing issue to be looked at later.

Change-Id: Id6ec19e6c8e5df4aa543a3e4f6b3c36b954d0971
Partial-Bug: 1856197
Signed-off-by: Kevin Smith <kevin.smith@windriver.com>
2019-12-12 13:30:46 -05:00
John Kung a977b0ba13 Set Elasticsearch clusterHealthCheckParams for recovery
In order to improve recovery from scenarios such as Dead Office
Recovery, set clusterHealthCheckParams  'local=true'

Verified also with mtce actions host-lock/unlock, swact.

Change-Id: I67324ab1db87b67dd3538b0160138aee333bc61f
Story: 2006990
Task: 37767
Signed-off-by: John Kung <john.kung@windriver.com>
2019-12-07 11:15:27 -05:00
Angie Wang 3a0c00ee39 Update stx-monitor manifest
The commit https://review.opendev.org/#/c/696123/ has
updated to handle various image formats for application
to support pulling images from local registry.

This commit updates the manifest to remove the unnecessary
image references and specify "null" for the images that
are not required for the app.

Change-Id: I6517ba3cb7173c70b8c00807dcb58f73ec426c62
Depends-On: https://review.opendev.org/#/c/696123/
Closes-Bug: 1851294
Signed-off-by: Angie Wang <angie.wang@windriver.com>
2019-11-26 12:14:52 -05:00
Kevin Smith a7c270d101 Adjust curator limits based on num of data nodes
Add an initcontainer to elasticsearch-curator that will
poll elasticsearch for the number of data nodes.  If the number
of data nodes found is 1, indicating either a locked controller
node or AIO-SX, write a file with a LIMIT_FACTOR of 2.  This
file will be sourced and used to adjust the existing index
limits accordingly before curator is run in the main container.

As the curator image does not include curl, use the filebeat
image, which also requires mounting a dummy directory:
/usr/share/filebeat.

Change-Id: I96ac6ee02e1446ca251a4c0cce5397669e399cea
Closes-Bug: 1852472
Partial-Bug: 1852462
Signed-off-by: Kevin Smith <kevin.smith@windriver.com>
2019-11-18 12:29:28 -05:00
John Kung 352430351c Update elastic charts to enable docker images from local repository
Update manifest with  imagePullSecrets or serviceaccount in order to
allow stx-monitor to pull images from local docker image repository.

The armada manifest has registry.local included until sysinv is updated
to be able to handle image overrides with the various elastic formats.

Verified that 'kubectl describe pods -n monitor' Image: are
pulled from registry.local

Verified elastic-curator and distributed cloud configuration with
stx-monitor.

Change-Id: Ia63e593bef96ea011cffbcca49ccf5a3a0f2f4d7
Partial-Bug: 1851294
Signed-off-by: John Kung <john.kung@windriver.com>
2019-11-12 15:10:41 -05:00
Zuul 035393a1e0 Merge "Build layering, add layer build config file and tarball lst file" 2019-11-01 18:46:30 +00:00
Kevin Smith b846376f2c Delay elasticsearch-data termination
This update adds a preStop lifecycle script to be run on
elasticsearch-data pods when they are also functioning
as master capable, as will be the case for AIO-DX without
worker hosts.  The script will check if the data node is
master capable, and if so sleep for a number of seconds
configured by an environment variable, defaulted to 100.

The elasticsearch-data termination delay is desired when
the single master capable only pod is on the standby
controller and that controller host is locked.  The delay
in termination will leave the 2 elasticsearch-data pods up
to maintain master quorum until the elasticsearch-master
pod has migrated over to the active controller.

This update also removes the check for green cluster
health status in the elasticsearch readiness probe.

Story: 2005733
Task: 37321

Change-Id: I6991ffff4e94342f9190896e92790cdaa8de9dea
Signed-off-by: Kevin Smith <kevin.smith@windriver.com>
2019-10-29 15:49:22 -04:00
Zuul 1b2fe9bb8e Merge "Add metadata for stx-monitor" 2019-10-28 15:18:26 +00:00
Zuul c32e17a679 Merge "Modify Manifest Statefulset Wait Parms" 2019-10-25 20:28:57 +00:00
Angie Wang b572232c96 Add metadata for stx-monitor
The metadata "maintain_user_overrides" is used to determine whether
the user overrides will be reused or not when updating the application
to a new version.

Set it true for stx-monitor.

Change-Id: Icfb5963f6396d099a61ca9d76963dc63531595b5
Partial-Bug: 1849486
Signed-off-by: Angie Wang <angie.wang@windriver.com>
2019-10-25 15:25:48 -04:00
Kevin Smith 287bcb3d64 Modify Manifest Statefulset Wait Parms
For the statefulsets being launched, we want to wait until
all pods in the statefulset go ready before moving on to
creating/updating other pods.

Story: 2005733
Task: 37303

Change-Id: I06b6c63574778f83944bbf96c4fadc4312b8682b
Signed-off-by: Kevin Smith <kevin.smith@windriver.com>
2019-10-25 13:49:35 -04:00
Matt Peters 433b216fbd update init container env to include node name
Update the init containers to have access to the same set of
environment variables as the runtime containers.  Specifically
NODE_NAME is required to ensure the name parameter is set
properly.

Change-Id: I6fa2494f75a7cd88f8f8f141f44ce34928a24956
Story: 2005733
Task: 36656
Signed-off-by: Matt Peters <matt.peters@windriver.com>
2019-10-25 11:56:33 -05:00
Zuul 44b43c4a9c Merge "elastic: application-update support" 2019-10-25 14:12:35 +00:00
Kevin Smith a796ef7fba elastic: application-update support
Modify the podManagementPolicy for elasticsearch pods
to OrderedReady so no outage is incurred during application-updates.
This setting will also affect initial application-apply, so the elasticsearch
helm chart is also modified to set the initial_master_nodes to
just the first master pod so it will go ready and the apply can proceed.

Change-Id: I87e73f6000430f81f2dc08d37ecd523682377ce3
Story: 2005733
Task: 37290
Signed-off-by: Kevin Smith <kevin.smith@windriver.com>
2019-10-24 18:04:16 -04:00
Matt Peters b3a982b6c1 Fix metricbeat filesystem metric collection
Add a root filesystem mount point for metricbeat to
enable access to the host file systems for collecting
filesystem specific metrics.

The filesystems are mounted under /hostfs within the
beat Pod, therefore the system.filesystem.mount_point
value must be filtered by Logstash to rewrite the path
to the original mount path on the host.

Change-Id: I7d98560eb00928e39a1c97ebc3e6b5dda8f5b278
Story: 2005733
Task: 37291
Signed-off-by: Matt Peters <matt.peters@windriver.com>
2019-10-24 16:02:03 -04:00
Zuul 1c24b8ffaa Merge "elastic: update masterService in manifest" 2019-10-24 16:45:51 +00:00