pkaramol

1

votes
1

answer
755

views

Escape chars in Terraform local exec provisioner

I want to chain Terraform and Ansible using the local-exec provisioner; However since this requires input to Ansible from Terraform I am stuck with the following complex command: provisioner 'local-exec' { command = 'sleep 60; ansible-playbook -i ../ansible/inventory/ ../ansible/playbooks/site.yml -...
pkaramol
1

votes
0

answer
157

views

kubernetes: Unable to get pod logs

I have set up a k8s cluster via Rancher UI on aws. I have deployed my app using several services and deployments. However, I am completely unable to get access to the pod/container logs. $ kubectl logs -f Unable to connect to the server: EOF What is more, when accessing the pod via the Kubernetes d...
pkaramol
1

votes
1

answer
108

views

kubernetes: ELB not redirecting to https despite nginx configuration

I have a LoadBalancer service on a k8s deployment on aws (made via kops). Service definition is as follows: apiVersion: v1 kind: Service metadata: name: ui annotations: service.beta.kubernetes.io/aws-load-balancer-ssl-cert: service.beta.kubernetes.io/aws-load-balancer-ssl-ports: '443' spec: ports:...
pkaramol
1

votes
1

answer
168

views

Service (LoadBalancer) port not working on aws

I have a LoadBalancer service on a k8s deployment on aws (made via kops). Service definition is as follows: apiVersion: v1 kind: Service metadata: name: ui annotations: service.beta.kubernetes.io/aws-load-balancer-ssl-cert: spec: ports: - name: http port: 80 targetPort: ui-port protocol: TCP - name...
pkaramol
1

votes
2

answer
1.6k

views

gitlab-runner: Add ssh key when executing locally

I am trying to run a ci pipeline locally for debugging purposes, via docker executor, by running: gitlab-runner exec docker At some point in time, it needs to clone a private git repo. I am using the typical recipe suggested by gitlab. variables: MY_PRIVATE_KEY: before_script: - 'which ssh-agent |...
pkaramol
1

votes
0

answer
116

views

Use alembic.ini for configuring db connection charset

I am performing migrations using alembic. Configuration is of course stored in the alembic.ini file. I would like to have the encoding used when running the migrations as a configurable parameter. Is there a field that can be used within alembic.ini to do so? e.g. [various_config] migrations_encodin...
pkaramol
1

votes
1

answer
686

views

Rancher/HAProxy: https redirect not working

I have set up a HAProxy lb in front of my services. According to the HAProxy documentation, in order to achieve 80 --> 443 redirect, the following line should be added to the Custom haproxy.cfg tab when configuring the service: redirect scheme https code 301 if !{ ssl_fc } This does not seem to wor...
pkaramol
1

votes
1

answer
148

views

ansible: Conditional not working [duplicate]

This question already has an answer here: stdout is not being passed correctly? 1 answer In the following tasks, I am trying to run the second one conditionally but the inequality operator does not seem to work: - name: debug debug: msg: '{{ rv_server_response.stdout }}' - name: setup_ssl -> Instal...
pkaramol
1

votes
0

answer
47

views

logstash: clones with ruby script

I want to clone some events in a logstash pipeline, several times using the corresponding plugin. So far I have been using an approach like the following: (this is from my logstash.conf) clone { clones => [1,2,3,4,5,6] } Is there a way to this in a more elegant manner to do this programatically usin...
pkaramol
1

votes
2

answer
490

views

Terraform: Cycle definitions in security group

I am defining a couple of instances that belong to an SG (this is from the instance resource definition) vpc_security_group_ids = ['${aws_security_group.rancher-nodes-sg.id}'] However, I want to also explicitly allow the public (i.e. elastic) IPs of the above instances as follows (this is from the a...
pkaramol
1

votes
2

answer
553

views

Cannot connect to mysql from within a docker container

Bulding a mysql based image as follows (Dockerfile): FROM mysql:5.7 COPY somescripts* /docker-entrypoint-initdb.d/ and then exec-ing into it: docker run --env='MYSQL_ROOT_PASSWORD=mypassword' -it theimagejustbuilt bash but ... [email protected]:/# mysql ERROR 2002 (HY000): Can't connect to local MyS...
pkaramol
1

votes
1

answer
52

views

pip unable to find wheel files

I am using the following command to install an application from a directory pre-populated with .whl files: pip install --find-links=/tmp/wheelhouse --no-index uwsgi myapp Here are the contents of /tmp/wheelhouse drwxrwxrwt 3 root root 4.0K Aug 28 07:37 .. -rw-r--r-- 1 root root 3.5M Aug 28 07:36 Bab...
pkaramol
1

votes
0

answer
141

views

AWS Cloudformation: cfg-init not adding keys to authorized_keys file

Trying to pre-populate an instance (created from an ECS-optimized AMI to be more specific) with some public keys as follows: Resources: MyEC2Instance: Type: AWS::EC2::Instance Properties: ImageId: 'ami-0af844a965e5738db' KeyName: 'some_existing_key' InstanceType: 't3.small' Metadata: AWS::CloudFor...
pkaramol
1

votes
1

answer
116

views

Is running spark on kubernetes still experimental?

We would like to test some Spark submission on a Kubernetes cluster; However, the official documentation is kind of ambiguous. Spark can run on clusters managed by Kubernetes. This feature makes use of native Kubernetes scheduler that has been added to Spark. The Kubernetes scheduler is currently e...
pkaramol
1

votes
0

answer
79

views

Ansible: installing roles in requirements file upon playbook execution

Vagrant has a very nice feature called galaxy_role_file that allows one to point to a requirements.yml file and to install the roles listed there upon vagrant up (provided that the vm is configured to use ansible provisioner). My question is whether there is such an option in ansible itself, given t...
pkaramol
1

votes
1

answer
24

views

Spark on DCOS: Make dispatcher reachable from outside the cluster

We have installed spark service from the marathon catalogue on a DCOS cluster. The json configuration of the service goes like this: { 'service': { 'name': 'spark', 'cpus': 1, 'mem': 1024, 'role': '*', 'service_account': '', 'service_account_secret': '', 'user': 'root', 'docker-image': 'mesosphere/s...
pkaramol
1

votes
0

answer
21

views

docker: Viewing network CIDR

When I perform hostname -I on my workstation, I am able to see all my IPs, including both the one belonging to my actual physical interface (say eth0) as also the virtual ones (in my case the ones created by the docker service). e.g. hostname -I 10.11.22.191 172.17.0.1 172.18.0.1 172.19.0.1 Is ther...
pkaramol
1

votes
2

answer
31

views

MySQL: How to pass parameter to a trigger

I have a table on a mysql 5.7 db, containing say athletes with their mean, max, avg times in a specific sport. I have another table that lists some calculated statistics based on those values. I managed to do the calculcations that end up on the second using stored procedures. I use as input paramet...
pkaramol
1

votes
1

answer
90

views

mysql: automatically convert seconds to hours for some columns

I am importing some csv data into mysql5.7. Some columns have some time values, in seconds. Since I cannot manipulate the .csv files, is there a way for those columns to be converted to hours just after the insertions (and before any other triggers are executed, given that there are already several...
pkaramol
1

votes
1

answer
975

views

PySide: QThread event handling

I have been researching the following issue on PySide threading, but I have found very little documentation so here goes a long post on my findings hoping for some concise feedback about how it goes. Supposing we are building a multi-threaded GUI application that invokes some linux processes. We wil...
pkaramol
1

votes
2

answer
67

views

Regex match in null bash string

In bash shell testvar= echo $testvar [[ $testvar =~ ^M* ]] && echo 'foo' foo Isn't the regex pattern matching strings starting with 'M', followed by anything?
pkaramol
1

votes
1

answer
355

views

Tomcat8: 404 error although webapp folder exists (dspace instances)

Using tomcat-8.0.32 on Ubuntu 16.04. I have configured /etc/tomcat8/server.xml to allow access to 2 different dspace instances as follows: However, although instance A is accessible, instance B returns a 404 error. The weird thing is that on catalina.out I get a WARNING about instance B. WARNING: Th...
pkaramol
1

votes
1

answer
272

views

Firefox does not recognize zip files

I am writing a servlet that dynamically creates a zip file from some input streams and opens a 'Save As' dialogue for download / store. Although when using Chrome the file is indeed recognized as a valid zip file, its type remains unknown when accessing it through Firefox. response.setContentType('a...
pkaramol
1

votes
2

answer
49

views

Ansible local configuration file not recognizing key?

I have a vagrant box with precise32 up and running. I am in ~/Workspace/vagrans/ansible folder where there is a file ansible.cfg with the following entries: [defaults] inventory = ./dms/dev private_key_file = /home/pkaramol/Workspace/vagrans/vagrant/precise32/.vagrant/machines/default/virtualbox/pri...
pkaramol
0

votes
0

answer
4

views

Re-establish git's submodule tracking branch after changes to remote

I have a project with 4 submodules, as in: $ cat .gitmodules [submodule '/submodules/sub1'] path = /submodules/sub1 url = [email protected]:namespace/sub1.git [submodule '/submodules/sub2'] path = /submodules/sub2 url = [email protected]:namespace/sub2.git [submodule '/submodules/sub3'] path...
pkaramol
1

votes
1

answer
71

views

ansible: ec2_asg module creates extra instance

I am using the following task to create an aws auto scaling group. - name: Create auto scaling group ec2_asg: name: '{{ els_aws_asg_name }}' launch_config_name: '{{ rv_ec2_lc.result.launch_configuration_name }}' region: '{{ VPC_REGION }}' min_size: 1 max_size: 5 desired_capacity: 1 vpc_zone_identifi...
pkaramol
1

votes
1

answer
360

views

Gitlab: piping commands with grep not working?

The following command in a job script: STATUS_ID=$(grep -Eo 'Status Code [0-9]+: Done' somefile | grep -Eo '[0-9]+') Seems to be causing the following ci lint error: script config should be a string or an array of strings The command works fine on my bash however when trying to grep the status code...
pkaramol
1

votes
2

answer
1.1k

views

kubernetes: Authentication to ui with default config file fails

I have successfully set up a kubernetes cluster on AWS using kops and the following commands: $ kops create cluster --name= --state=s3:// --zones=eu-west-1a --node-count=2 --node-size=t2.micro --master-size=t2.small --dns-zone= $ kops update cluster --yes When accessing the dashboard, I am prompted...
pkaramol
1

votes
1

answer
499

views

kubernetes: Error deploying dashboard (ui)

I have successfully set up a kubernetes cluster on AWS using kops and the following commands: $ kops create cluster --name= --state=s3:// --zones=eu-west-1a --node-count=2 --node-size=t2.micro --master-size=t2.small --dns-zone= $ kops update cluster --yes The cluster has 1 master and 2 slaves. I am...
pkaramol
1

votes
1

answer
610

views

ansible: escape double curly braces in variable definition

I have a var in the following form: my_var: 'http://somedomain/{{ sometoken }}' When I run the playbook it fails with sometoken is undefined What is the correct syntax for the above variable definition?
pkaramol
1

votes
3

answer
412

views

SonarQube MSBuild fails to exclude files

I am running an analysis using msbuild on debian, using the following command: mono /msbuild/SonarQube.Scanner.MSBuild.exe begin /d:sonar.login= /d:sonar.host.url=https:// /d:sonar.exclusions=test/**/* /k: However in the end command: INFO: Index files INFO: Excluded sources: INFO: test/**/* INFO:...
pkaramol
1

votes
1

answer
23

views

Logstash: create url-friendly _id for documents

I am using the fingerprint plugin to create custom _id fields that should be base64 encoded: fingerprint { key => 'somekey' base64encode => true method => 'SHA512' source => [ 'username' ] target => '[@metadata][custom_id]' } truncate { fields => '[@metadata][custom_id]' length_bytes => 20 } Howev...
pkaramol
1

votes
2

answer
691

views

terraform: Add an OS user with a given public key

I have created an EC2 instance on AWS using terraform; What I want is to add a user in the OS level and provide a particular key to be added in its ~/.ssh/authorized_keys file. The aws_instance documentation does not seem to list this functionality. Is there a way to go about this? edit: I think a w...
pkaramol
1

votes
1

answer
242

views

docker-entrypoint best practice for script execution

I want to run a couple of scripts on my docker-entrypoint.sh; My question if whether it makes any difference and if it does, what is the recommended way of going about this, regarding the following options: A. ${HOMEDIR}/myscript --param1 --param2 B. bash -c '${HOMEDIR}/myscript --param1 --param2' C...
pkaramol
1

votes
1

answer
142

views

packer: Use custom configuration file for ansible provisioner

I am trying to provision a machine built with packer, using its ansible provisioner; Provisioning fails to find some roles which I have set in my custom ansible.cfg file as follows: [defaults] stdout_callback = yaml retry_files_enabled = False vault_password_file = .vault roles_path = ./roles Packer...
pkaramol
1

votes
1

answer
45

views

AWS EC2: Inconsistent volume name

I am trying to automate the process of backing up some ec2 instance volumes with ansible's respective module. However, when I log in to my instance: $ df -h Filesystem Size Used Avail Use% Mounted on udev 488M 0 488M 0% /dev tmpfs 100M 11M 89M 11% /run /dev/xv...
pkaramol
1

votes
1

answer
0

views

AWS: CloudWatch agent configuration file

I am trying to provide the CW agent configuration, regarding which files the latter should track; According to this documentation, such info should be configured in /etc/awslogs/awslogs.conf (along with appropriate region setting in /etc/awslogs/awscli.conf). However, this page indicates that log so...
pkaramol
1

votes
1

answer
0

views

AWS: Simple cfn-init fails on Amazon Linux 2 for no apparent reason

I am provisioning a cloudformation stack. I am just trying to run the simplest possible cfn-initever on an instance started using a custom ami that was based on Amazon Linux 2: EC2ESMasterNode1: Type: AWS::EC2::Instance Metadata: Comment: ES Cluster Master 1 instance AWS::CloudFormation::Init: confi...
pkaramol
1

votes
1

answer
0

views

Hiding variable output in custom ansible module

I am writing a custom ansible module. When it exits, whether with success or failure, it prints out all the variables such as changed: [localhost] => changed=true invocation: module_args: jira_token: sometoken jira_user: myuser The variable parsing is as instructed in the relevant tutorial. ansibl...
pkaramol
1

votes
1

answer
0

views

Prometheus configuration and http_requests_total

Ι have installed prometheus with the default configuration. I am at its web interface, on http://localhost/9090/metrics trying to fetch the time series corresponding to the total of http requests. Filtering out by the name http_requests_total, retrieves several time series with different labels, e....
pkaramol

View additional