DevOps notes

Sortable table in DataMigration report

For adding a sortable table (enable support JS scripts ) in Jenkins need to Content-Security-Policy header.

More details here:

https://www.jenkins.io/doc/book/security/configuring-content-security-policy/

https://stackoverflow.com/questions/35783964/jenkins-html-publisher-plugin-no-css-is-displayed-when-report-is-viewed-in-j


Changes in code:

In pipelines-shared-library\vars\dataMigrationReport.groovy file in createHtmlReport function add these changes:

  • in markup.html add markup.script part with a link to js script
  • in markup.table add class: "sortable",

markup.script( '', type:'text/javascript', src:'https://www.kryogenix.org/code/browser/sorttable/sorttable.js')

More details about this script here.

Access to Kibana

To provide access to Kibana UI need go to AWS Cognito. Choose needed User pool (user pool name contains cluster name):

Create a new user:

Provide needed information about user:

After the first login user must change the password in UI.

If you choose Send an email invitation password will send to the email. If not please provide a password to the user by yourself.

Change OpenSearch number of replica

By default in AWS OS set the number of replicas 2. With 2 nodes and 2 replicas, all indices are in yellow status.

To fix this issue need or increase the number of nodes or decrease the replica count. We choose to decrease. 

To change the count need to create a policy:

{
    "policy": {
        "description": "Set number of replicas to 1 for indices starting with 'folio'",
        "default_state": "open",
        "states": [
            {
                "name": "open",
                "actions": [
                    {
                        "replica_count": {
                            "number_of_replicas": 1
                        }
                    }
                ],
                "transitions": []
            }
        ],
        "ism_template": {
            "index_patterns": [
                "folio*"
            ],
            "priority": 100,
            "last_updated_time": 0
        }
    }
}