creating rabbitmq vhost with kombu - rabbitmq

I am looking for a way to create and configure vhosts in rabbitmq with kombu but found nothing in the documentations. Is there a way to do so?
In addition - is there a permission / role in rabbitmq (other than admin) that allows to create vhosts?

I'm not familiar with kombu, but if it can call an external command, namely rabbitmqctl, than it could use it to create the vhost. Also there is way by using the http API (just look for create a new vhost).
You can create a new user (using the aforementioned methods or WebUI) and give it any permission you want - if tagged as administrator that user will be able to create new vhosts.

Related

Is there an Ansible module for creating 'instance-store' based AMI's?

Creating AMI's from EBS backed instances is exceedingly easy, but doing the same from an instance-store based instance seems like it can only be done manually using the CLI.
So far I've been able to bootstrap the creation of an 'instance-store' based server off of an HVM Amazon Linux AMI with Ansible, but I'm getting lost on the steps that follow... I'm trying to follow this: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-instance-store-ami.html#amazon_linux_instructions
Apparently I need to store my x.509 cert and key on the instance, but which key is that? Is that...
one I have to generate on the instance with openssl,
one that I generate/convert from AWS,
one I generate with Putty, or
one that already exists in my AWS account?
After that, I can't find any reference to ec2-bundle-vol in Ansible. So I'm left wondering if the only way to do this is with Ansible's command module.
Basically what I'm hoping to find out is: Is there a way to easily create instance-store based AMI's using Ansible, and if not, if anyone can reference the steps necessary to automate this? Thanks!
Generally speaking, Ansible AWS modules are meant to manage AWS resources by interacting with AWS HTTP API (ie. actions you could otherwise do in the AWS Management Console).
They are not intended to run AWS specific system tools on EC2 instances.
ec2-bundle-vol and ec2-upload-bundle must be run on the EC2 instance itself. It is not callable via the HTTP API.
I'm afraid you need to write a custom playbook / role to automate the process.
On the other hand, aws ec2 register-image is an AWS API call and correspond to the ec2_ami Ansible module.
Unfortunately, this module doesn't seem to support image registering from an S3 bucket.

Restart Kubernetes API server with different options

I'm pretty new to Kubernetes and clusters so this might be very simple.
I set up a Kubernetes cluster with 5 nodes using kubeadm following this guide. I got some issues but it all worked in the end. So now I want to install the Web UI (Dashboard). To do so I need to set up authentication:
Please note, this works only if the apiserver is set up to allow authentication with username and password. This is not currently the case with the some setup tools (e.g., kubeadm). Refer to the authentication admin documentation for information on how to configure authentication manually.
So I got to read authentication page of the documentation. And I decided I want to add authentication via a Static Password File. To do so I have to append the option --basic-auth-file=SOMEFILE to the Api server.
When I do ps -aux | grep kube-apiserver this is the result, so it is already running. (which makes sense because I use it when calling kubectl)
kube-apiserver
--insecure-bind-address=127.0.0.1
--admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,ResourceQuota
--service-cluster-ip-range=10.96.0.0/12
--service-account-key-file=/etc/kubernetes/pki/apiserver-key.pem
--client-ca-file=/etc/kubernetes/pki/ca.pem
--tls-cert-file=/etc/kubernetes/pki/apiserver.pem
--tls-private-key-file=/etc/kubernetes/pki/apiserver-key.pem
--token-auth-file=/etc/kubernetes/pki/tokens.csv
--secure-port=6443
--allow-privileged
--advertise-address=192.168.1.137
--kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
--anonymous-auth=false
--etcd-servers=http://127.0.0.1:2379
Couple of questions I have:
So where are all these options set?
Can i just kill this process and restart it with the option I need?
Will it be started when I reboot the system?
in /etc/kubernetes/manifests is a file called kube-apiserver.json. This is a JSON file and contains all the option you can set. I've appended the --basic-auth-file=SOMEFILE and rebooted the system (right after the change of the file kubectl wasn't working anymore and the API was shutdown)
After a reboot the whole system was working again.
Update
I didn't manage to run the dashboard using this. What I did in the end was installing the dashboard on the cluster. copying the keys from the master node (/etc/kubernetes/admin.conf) to my laptop and did kubectl proxy to proxy the traffic of the dashboard to my local machine. Now I can access it on my laptop through 127.0.0.1:8001/ui
I just found this for a similar use case and the API server was crashing after adding an Option with a file path.
I was able to solve it and maybe this helps others as well:
As described in https://kubernetes.io/docs/reference/setup-tools/kubeadm/implementation-details/#constants-and-well-known-values-and-paths the files in /etc/kubernetes/manifests are static pod definitions. Therefore container rules apply.
So if you add an option with a file path, make sure you make it available to the pod with a hostPath volume.

Weblogic. Add one more domain with SOA

I have got task, to add one more domain with SOA app to Weblogic server. As I understand, I have to run RCU and create schemas for new domain before running ./config.sh
The problem is that I not sure is this correct solution. There is a lot step by step manuals how to create domain, but is there any differences when adding second domain?
Thanks
You cannot add domain to WebLogic server. Domain is like logical grouping of related WebLogic servers. You can either extend existing domain to include SOA application or create whole new domain with SOA application. In both cases you will need to run RCU at some point before initially lunching your domain. It's best that you read/follow oracle documentation related to your specific version of WebLogic/Oracle Fusion Middleware.
To add second domain, at first you have to run RCU:
cd RCU_HOME/bin
./rcu
and create new repository. When repository is created, you need to run config.sh:
cd SOA_ORACLE_HOME/common/bin
./config.sh to create new domain.
Be careful when creating soa_server: ports numbers used for soa and admin server shouldn't be the same, as in first domain, and soa_server name should be different.
More info about creating domain you can find here:
https://oracle-base.com/articles/11g/weblogic-11g-create-extend-and-remove-domains
and here:
http://docs.oracle.com/cd/E28280_01/install.1111/e14318/qisoa.htm#CACCAEBE

CL based method for adding HTTP Servers on IBMi system

I have a need to develop a CL script to quickly deploy a web application across a set of IBMi systems.
Right now, I have everything set up where I can create the directories, deploy the configurations (with the correct modifications) and place the files all from the CL script, but I cannot get it to automatically create and start the HTTP Server.
All of the documentation I can find requires that the servers be set up through the "IBM Web Administration for iSeries interface." Which is pretty much useless if I am trying to automate the entire system.
The only CL commands I can find which are of use are STRTCPSVR and ENDTCPSVR . However, there does not seem to be a clear way to add the server to the underlying system to start it.
Does anyone know of a CL command that does this? If not, is there an object/member I can edit which would add a server to the HTTPA, set it to point to the already set up htdocs and conf directories and then I can start it with STRTCPSVR?
See the Create Apache Server Instance (QzuiCreateInstance) API for a method to automate the creation of http instances.
The QzuiCreateInstance() API allows users to create a new IBM® HTTP Server for i server instance.
Also the QUSRSYS/QATMHINSTC file contains a member for every configured instance. Each member has one record that contains an entry in the format of -apache -d /www/instancename -f conf/httpd.conf. You may be able to create members and add the record without using the API.
Refer to:
How to Manually Create a HTTP Server
About_HTTP_directives_for_CGIDEV2
http://compgroups.net/comp.sys.ibm.as400.misc/create-an-apache-instance/1345746
Quick Summary:
Each HTTP server instance requires its own member in QUSRSYS/QATMHINSTC
/QSYS.LIB/QUSRSYS.LIB/QATMHINSTC.FILE/<SERVERNAME>.MBR
The member above should contain one record
-apache -d /www/<SERVERNAME> -f conf/httpd.conf -AutoStartN
Refer to /www in the IFS for for the file structure of the HTTP Server
Use <IBMi>:2001/HTTPAdmin/ to create a sample HTTP server, which can be used as the basis for future generated HTTP Servers.
Starting / Stopping the HTTP Server instance
srtcpsvr *http httpsvr(<SERVERNAME>)

How get running squid3 with a local datase user?

I want get running squid3 and obligate users to authenticate again a local and simple database users-pass file. Can be user-pass file of the system or a simple .txt file, whatever is more easy.
Here is a more comprehensive guide to setting up a Squid 3 server with htdigest authentication: http://dabase.com/blog/Minimal_squid3_proxy_configuration/
Using
/usr/lib/squid3/digest_pw_auth
helper that come with squid installation works.
/usr/bin/htdigest
can be used to create the user-pass file.