pkaramol

0

votes
0

answer
5

views

Elasticsearch: Data server not discovering master

I have a 1 data - 1 master es cluster. (using 6.4.2 on CentOS 7) On my master01: ==> /opt/elasticsearch/logs/master01-elastic.my-local-domain-master01-elastic/esa-local-stg-cluster.log
pkaramol
1

votes
2

answer
325

views

AWS S3: IA vs One-Zone IA Storage Classes

Amazon announced on April 2018 the availability of a new storage class, named One-Zone Infrequent Access, that complements the plain IA option by lowering the cost via the usage of only one AZ for storage. Its site, advertises that all storage classes have the so-called 11 9s durability. My question...
pkaramol
1

votes
2

answer
489

views

Handling POST data in django forms

What is the difference (if any) between the following 2 approaches when handling POST data in a form view: 1. def form_view(request): form = MyForm(request.POST or None) if form.is_valid(): # handle POST data here 2. def form_view(request): if request.method == "POST": form = MyForm(request.POST) if...
pkaramol
2

votes
2

answer
44

views

AWS: Assinging IAM roles to IAM users

According to the offical AWS documentation, IAM Roles can also be attached to IAM Users, and not only services. What would be a valid use case to assign an IAM Role to an IAM User? Aren't all the cases covered by directly granting (allow/deny) IAM Policies to the users? TBH my initial impression was...
pkaramol
2

votes
3

answer
37

views

AWS: Use EC2 instance creation to trigger lambda

I am compiling a fairly complex CloudFormation template and at some point I am creating an ec2 instance; I want to create a lambda function that: takes as input parameter the public IP of the instance created in this CF stack opens a security group port for that particular IP (the security group is...
pkaramol
4

votes
2

answer
2.2k

views

Maven: dependency appears in effective pom but not in dependency tree

Working on a multi-module project. GrandParent \ Parent \ Child GrandParent has rogue_1 module in its section as provided ! Parent does NOT have rogue_1 in its pom.xml at all. Child does NOT have rogue_1 as a direct dependency in its pom.xml. However it includes several other projects some of which...
pkaramol
3

votes
1

answer
757

views

kubernetes: CA file when deploying via kops

I have created a cluster on aws using kops. However I am unable to find the file used as/by the certificate authority for spawning off client certs. Does kops create such a thing by default? If so, what is the recommended process for creating client certs? The kops documentation is not very clear ab...
pkaramol
2

votes
1

answer
339

views

apt-key command works on shell but fails on Dockerfile

The following command seems to work when running it in a shell apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF but fails when executed in a Dockerfile as follows: Warning: apt-key output should not be parsed (stdout is not a terminal) Execu...
pkaramol
13

votes
2

answer
2.9k

views

Role of docker-in-docker (dind) service in gitlab ci

According to the official gitlab documentation, one way to enable docker build within ci pipelines, is to make use of the dind service (in terms of gitlab-ci services). However, as it is always the case with ci jobs running on docker executors, the docker:latest image is also needed. Could someone e...
pkaramol
2

votes
1

answer
428

views

Will git push --force delete remote files?

If i perform a git push --force will this delete files in the , if these do not exist in my branch? (apart of course from prioritizing my local changes over remote ones, when it comes to files existing in both local and remote branches)
pkaramol
3

votes
1

answer
891

views

Django-Bootstrap3 issues with inline form layout

Using the following code to render a form: {% csrf_token %} {% bootstrap_form form layout='inline' %} {% buttons %} {% bootstrap_icon "star" %} Submit {% endbuttons %} Here is the output: And here it is when removing layout='inline' Datepicking is done by adding a custom class upon form creation wit...
pkaramol
2

votes
1

answer
3.1k

views

JavaFX: Best way to update GridPane after row deletion?

I am using a GridPane (inside a ScrollPane) as a table with user entries. Each row incorporates a username (Label), an icon depicting its state (ImageView) and two buttons, the second of which is used to delete the user entry. The two images below depict the scroll pane before and after the user en...
pkaramol
13

votes
4

answer
16.5k

views

Recommended way for installing PySide on Ubuntu

What is the recommended way of setting up PySide for development in Ubuntu? sudo apt-get install python3-pyside? sudo pip install pyside? sudo easy_install pyside?
pkaramol
1

votes
1

answer
2k

views

Vagrant: multiple playbooks for ansible provisioner

Is it possible / valid to run more than one playbooks for a vagrant ansible provisioner in the following form: config.vm.define "repo", primary: true do |d| d.vm.hostname = "some.hostname" # Create a private network, which allows host-only access to the machine # using a specific IP. d.vm.network :p...
pkaramol
3

votes
0

answer
29

views

pip: Python libraries interdependency resolution issue

I have the following section in my setup.py for mymainapp: install_requires=[ 'myapp1==0.2.0', 'myapp2==0.6.0', ... ] Here are the corresponding install_requires sections for those two app/dependencies: myapp1 0.2.0 install_requires=[ sas==1.2.0' ], myapp2 0.6.0 install_requires=[ sas==1.6.1' ], The...
pkaramol
3

votes
2

answer
78

views

pip: Reinstall a package even if it exists

I want to run a pip install -r requirements.txt command; I want to run the same command over and over again; The issue is that requirements.txt will include some wheel files which may have the same version but different source code; I want to make sure the package will be reinstalled, i.e. fetched a...
pkaramol
2

votes
1

answer
2.1k

views

Ansible blockinfile module idempotent?

I want to insert some lines in a file using the blockinfile module. The task goes something like this: name: add some lines become: true blockinfile: dest: /etc/sysctl.conf block: | mykey1={{ kernvars['my_value1'] }} mykey2={{ kernvars['my_value2'] }} mykey3={{ kernvars['my_value3'] }} Is there a wa...
pkaramol
2

votes
0

answer
189

views

Importing commit history from Bitbucket to Github

I wanted to import a project from Bitbucket to Github (both public repos). However at some point in time (not the commit pointed by HEAD) some very large files were used which made the above process to fail. So I just pushed the plain source code to gh. I would like however to be able to have the pr...
pkaramol
1

votes
2

answer
433

views

Dockerfile: Inherit environmental variables from shell

When building an image using a Dockerfile, in order to make some env vars available to the docker build context, one should explicitly declare associations of the form ENV MYVAR=MYVALUE AFAIK (correct me if I am misguided here), the environmental variables exported to the shell from which the docke...
pkaramol
1

votes
1

answer
566

views

Terraform: User Data not rendered

Using terraform to run some user data upon instance creation: user_data = "${template_file.user_data.rendered}" Here is the definition: resource "template_file" "user_data" { template = "files/user_data.tpl" vars { docker_version = "17.12.1~ce-0~ubuntu" } } However, in the created instance, the user...
pkaramol
3

votes
2

answer
203

views

Setting up a Deb Package for a Python Project - Database (sqlite3) setup

I am trying to make a .deb package out of a python project I am working on. The program needs a .sqlite file though, that somehow needs to be initialized (create it and set up tables, associations etc). Although there is a lot of documentation on deb package creation, e.g. -From Debian Wiki -A pytho...
pkaramol
1

votes
2

answer
605

views

Terraform s3 backend vs terraform_remote_state

According to the documentation, to use s3 and not a local terraform.tfstate file for state storage, one should configure a backend more or less as follows: terraform { backend "s3" { bucket = "my-bucket-name" key = "my-key-name" region = "my-region" } } I was using a local (terraform.tfstate) file...
pkaramol
2

votes
1

answer
32

views

Git: Merge result subset of merged file

Assuming there is a fileA on master (say it consists of 1000 lines) We are on feature_branch, where fileA has length of say 1050 lines. Then how it it possible, being on master and performing git merge feature_branch that fileA ends up having (again) 1000 lines? The merge messages showed no conflict...
pkaramol
1

votes
1

answer
54

views

k8s: service unchanged but not listed

I am trying to create a service on kubernetes but although no error is printed, I am unable to list the service; working locally with minikube *$ kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.96.0.1 443/TCP 4h /home/pk...
pkaramol
1

votes
2

answer
804

views

Using id (Primary Key) of a Model as ForeignKey when creating new model instances in Django through shell

For illustration purposes, just two plain models: class PrimaryModel(models.Model): foo = models.CharField(max_length=50, unique=True) class SecondaryModel(models.Model): bar = models.ForeignKey(PrimaryModel) Now trying to create instances in shell: >>> import testapp.models >>> a=testapp.models.Pri...
pkaramol
2

votes
1

answer
677

views

gitlab-ci: Dynamic artifact names

I am running a gitlab-ci job that will fetch locally a file from a remote server, more or less as follows: retrieve_docs: stage: fetch_docs image: debian:jessie script: - ssh [email protected]$SERVER /perform/some/work - INSTFILE=$(ssh [email protected]$SERVER bash -c 'find /root -iname "somepattern*" | tail -n 1...
pkaramol
6

votes
1

answer
430

views

Gitlab: publish html report

I am using a gitlab pipeline to run some tests and produce a coverage report. What I would like to do is be able to publish the produced coverage folder (that includes an html page and an src folder) to some internal gitlab static page, viewable by some team members. I am aware of the gitlab pages c...
pkaramol
4

votes
3

answer
194

views

Docker for AWS vs pure Docker deployment on EC2

The purpose is production-level deployment of a 8-container application, using swarm. It seems (ECS aside) we are faced with 2 options: Use the so called docker-for-aws that does (swarm) provisioning via a cloudformation template. Set up our VPC as usual, install docker engines, bootstrap the swarm...
pkaramol
2

votes
2

answer
2.3k

views

Best way to install docker on Vagrant

I want to create several VMs that have docker pre-installed. What is the best/recommended way to go about this? a) Have docker provisioner do something dummy, just so that docker gets installed, e.g. mymachine.vm.provision "docker" do |docknode| # do something pointless end b) run docker installatio...
pkaramol
7

votes
1

answer
368

views

Python set interpetation of 1 and True

In IPython 3 interactive shell: In [53]: set2 = {1, 2, True, "hello"} In [54]: len(set2) Out[54]: 3 In [55]: set2 Out[55]: {'hello', True, 2} Is that because 1 and True get the same interpetation so given that set eliminates duplicates, only one of them (True) gets to stay? How can we keep both?
pkaramol
2

votes
0

answer
250

views

aws: “Matched event” in a CloudWatch Rule

I am following the official aws guide on how to automate handling of email bounces and complaints and have a custom html report generated. I used the CloudFormation template as provided by Amazon. This created among other things a CloudWatch rule that uses as target a lambda function (also provided...
pkaramol
1

votes
1

answer
1.2k

views

Terraform: self-reference not allowed in Security Group definition

I am trying to create an sg with terraform. I want all instances of a particular SG to have all communication allowed among them, so I am adding the SG itself to the ingress rules as follows: resource "aws_security_group" "rancher-server-sg" { vpc_id = "${aws_vpc.rancher-vpc.id}" name = "rancher-ser...
pkaramol
3

votes
1

answer
219

views

kubernetes: kops and IAMFullAccess policy

According to documentation of both kops and aws, the dedicated kops user needs IAMFullAccess permission to operate properly. Why is this permission needed? Is there a way to avoid (i.e. restrict) this, given that it is a bit too intrusive to create a user with such a permission? edit: one could assu...
pkaramol
3

votes
2

answer
1.6k

views

SonarQube: Typescript module not found

I am using SonarQube to analyze a JS project. Analysis runs in a gitlab pipeline stage, using a docker image equipped with sonar-scanner. Here is some output: INFO: Download sonar-flex-plugin-2.3.jar INFO: Download sonar-gitlab-plugin-2.1.0.jar INFO: Download sonar-auth-gitlab-plugin-1.2.2.jar INFO:...
pkaramol
2

votes
1

answer
784

views

Ansible Tower API not accepting token

I am performing the following POST in a Tower server: http:///api/v2/job_templates/10/launch/ Headers: Content-Type:application/json Authorization:sometokenhere And getting back the error: {"detail":"Authentication credentials were not provided."} Have also tried the following: Headers: Content-Type...
pkaramol
2

votes
1

answer
2.3k

views

docker-compose service version error

I am trying to run this example from the official docker page. However I am getting the following error: ERROR: In file './docker-compose.yml' service 'version' doesn't have any configuration options. All top level keys in your docker-compose.yml must map to a dictionary of configuration options. wh...
pkaramol
2

votes
1

answer
171

views

openLDAP: login with userPrincipalName

I have set up an openLdap server instance. Login for the time being requires providing as username the user's dn, e.g. "cn=151test,cn=somecn,ou=someou,dc=mydomain,dc=com" How is it possible to enable login with userPrincipalName in the form of [email protected] ? edit: it seems that userPrincipal...
pkaramol
1

votes
1

answer
185

views

Ansible: Change python interpeter when delegating to

I am running some plays on host A. There are some other plays that need to run on host B (Ubuntu 16.04) that however ships only with python3, therefore the following task - name: db_config -> Create MY database mysql_db: ...create some db delegate_to: "{{ ec2_instance_ip }}" fails with: failed: [lo...
pkaramol
2

votes
0

answer
37

views

docker: containers in stacks within EC2 instance do not inherit dns nameserver

I have set up an EC2 instance on AWS. Have set up my security groups properly so that the instance is able to reach the Internet, e.g. [email protected]:/data$ ping www.google.com PING www.google.com (216.58.211.164) 56(84) bytes of data. 64 bytes from dub08s01-in-f4.1e100.net (216.58.211.164): i...
pkaramol
0

votes
0

answer
3

views

Logstash filter not replacing variable

I am performing the following mutate/add_field transofmations in a logstash filter: mutate { add_field => { "[retrieved_sessionid_new]" => "%{[retrieved_sessionid][0]}" } add_field => { "[totalBytes]" => "%{[retrieved_sessionid_new][totalBytes]}" } } Here is how it comes up in stdout (and elasticsea...
pkaramol

View additional