Alternatives to point to GitLab private registry for Scala (Play) projects? - scala

What's the easiest way to publish ~10 public packages (like mockito-scala,java-jwt, ...) into the GitLab private registry? "https://gitlab.com/api/v4/projects/SOME_PROJECT_ID/packages/maven"
(mvn deploy:deploy-file?)
So the Scala Play project can point to the private registry?
(Came across this https://github.com/gilcloud/sbt-gitlab. Are there other solutions?)

In order to publish artifact to Gitlab private registry, the general command is:
mvn deploy:deploy-file \
-Durl=https://gitlab.com/api/v4/groups/xxxxxx/-/packages/maven/ \
-DrepositoryId=gitlab-maven \
-Dfile=target/jar/ID-1.0.0-SNAPSHOT.jar \
-DgroupId=ID \
-DartifactId=ID \
-Dversion=1.0.0-SNAPSHOT \
-Dpackaging=jar \
-DgeneratePom=true
And you can see an settings.xml/pom.xml example here.
But only with maven:3.8.3-jdk-11 or more.

Related

How to replace jar internal dependencies when submitting spark submit

I want to replace the library containing the business logic used in the application when submitting spark submit.
For example, I would like to replace the test v1.1.1 internal library that is being used in project "A" with test v2.2.2 upon spark submit.
spark-submit
$SPARK_HOME/bin/spark-submit \
--jars "$TEST_JARS_V2.2.2" \
--name $APP_NAME \
--master yarn \
--deploy-mode cluster \
--verbose \
--class AAA.AAA.batch.EntryPoint \
/.../.../A.jar(exclude test dependency)
sbt
"?.?.?" %% "test" % "1.1.1" % Provided
In this first way
I registered the internal library test v1.1.1 as "Provided" in project A, excluded it from the fat jar, and injected test library v2.2.2 through spark submit --jars.
But it seems that the test library cannot be injected.
The classes in the test library were not found.
Please advise if I did something wrong.

Creating an AKS Cluster using C#?

I have not found a way to do so using C# K8s SDK: https://github.com/kubernetes-client/csharp
How to create a AKS Cluster in C#? Basically, the following command:
az aks create -g $RESOURCE_GROUP -n $AKS_CLUSTER \
--enable-addons azure-keyvault-secrets-provider \
--enable-managed-identity \
--node-count $AKS_NODE_COUNT \
--generate-ssh-keys \
--enable-pod-identity \
--network-plugin azure
Sending a PUT request with payload (JSON body) to ARM.
See this: https://learn.microsoft.com/en-us/rest/api/aks/managed-clusters/create-or-update?tabs=HTTP

How to update Rundeck project setting using CLI

I want update project settings for existing Rundeck Project. For example : add resources / nodes to the Rundeck project using CLI. How do I do that?
Solution:
Below is the command using Rundeck CLI to add a resource file in .xml format to an existing Rundeck project
$ rd projects configure set -p MG-Test-CLI --
--resources.source.1.config.file="/home/rundeck/iidas/resources.xml" \ --resources.source.1.config.generateFileAutomatically=true
--resources.source.1.config.includeServerNode=true
--resources.source.1.type=file
Here more useful Rundeck CLI project commands:
# create project
rd projects create -p project1
# get project configuration
rd projects configure get -p project1
# Configure nodes from remote URL (GitLab)
rd projects configure update -p project1 -- \
--resources.source.1.type=url \
--resources.source.1.config.url='https://git.i.example.com/api/v4/projects/3/repository/files/project1%2Fdev%2Fnodes.json/raw?ref=master&private_token=1234567890' \
--resources.source.1.config.timeout=10 \
--resources.source.1.config.cache=false
See also Rundeck CLI documentation and project parameter.

Managing parameters in Cloudformation template

I was deploying a cloudformation template (pre-build and provided by AWS) and was looking for a way to control the parameters (i.e. update it on regular basis with new parameters). I was wondering if there is a programmatic best practice to manage this?
Thanks!
If you want to update an existing stack, you can use the aws-cli and run the aws cloudformation update-stack command with an --parameters argument that specifies the parameters you want. You can also update the template itself with --template-body or --template-url, if needed.
Documentation: https://docs.aws.amazon.com/cli/latest/reference/cloudformation/update-stack.html
Better to use aws cloudformation deploy
Something like this
aws cloudformation deploy \
--template-file ./template.yaml \
--s3-bucket ${s3_bucket_name} \
--s3-prefix ${cf-templates} \
--stack-name ${stackName} \
--capabilities CAPABILITY_NAMED_IAM \
--no-fail-on-empty-changeset \
--parameter-overrides par1=${par1value} par2=${par2value} \
--tags tag1=tag1value tag2=tag2value \
--profile test_profile

Kubeflow kale failed to connect Rok module

I am trying to integrate kubeflow kale in jupyterlab. For that, I have installed the recommeded package using the below command
RUN pip3 --no-cache-dir install \
--upgrade pip \
urllib3==1.24.3 \
jupyter-client==6.1.5 \
nbformat==5.0.2 \
six==1.15 \
numpy==1.17.3 \
jupyter-console==6.0.0 \
jupyterlab==1.1.1 \
jupyterthemes \
xgboost \
kubeflow-fairing==1.0.0 \
[![enter image description here][1]][1]kubeflow-kale
# Kale installation
RUN jupyter labextension install kubeflow-kale-launcher
The docker image was build successfully. When I run this jupyterlab in the cluster I am getting the below error
Details: Rok Gateway Client module not found
Do I need to install any other plugins?
Please help anyone to fix this problem. Thanks in advance
You should to install ROK on Your Kubernetes cluster.
Without ROK you can't use it