Is Disaster Recovery Turned On? - ibm-datapower

Where can I check, whether disaster recovery is turned on/off on a XI52 DataPower Appliance?

Use show system from CLI and check backup mode property. Also you can use WebGUI Administration->Device->System Settings
xi50(config)# show system
product id: 92354BX [Rev 01]
OID: 1.3.6.1.4.1.14685.1.3
uptime: 105 days 10:39:08
contact: contact
name: XXXXXXX
location: Location
services: 72
backup mode: secure
product mode: normal

Related

Tables not creating after running worker and dashborad in wso2 api manager 3.2.0?

Following ables not creating after running worker and dashborad in wso2 api manager 3.2.0 oracle config:
a. WSO2_DASHBOARD_DB
b. BUSINESS_RULES_DB
c. WSO2_PERMISSIONS_DB
d. WSO2_METRICS_DB
what is the problem?
name: WSO2_PERMISSIONS_DB
description: The datasource used for permission feature
jndiConfig:
name: jdbc/PERMISSION_DB
useJndiReference: true
definition:
type: RDBMS
configuration:
jdbcUrl: 'jdbc:oracle:thin:#apigwdb-scan.shoperation.net:1521/APIGWDB'
username: 'WSO2_PERMISSIONS_DB'
password: 'apigw14'
driverClassName: oracle.jdbc.driver.OracleDriver
maxPoolSize: 10
idleTimeout: 60000
connectionTestQuery: SELECT 1 FROM DUAL
validationTimeout: 30000
isAutoCommit: false
connectionInitSql: alter session set NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
By default all these dbs have h2 configs in the deployment.yaml. You have to create the relevant dbs in the Oracle server and change each config for the tables to be created in those dbs.
Also, please check whether the user you have used have sufficient permission.
For more information, please check https://apim.docs.wso2.com/en/3.2.0/learn/analytics/configuring-apim-analytics/#step-42-configure-the-analytics-dashboard

Symfony 4 local development with Homestead

I want to develop with Symfony4 on my local machine. But somehow I can't get any good configuration working. At the moment, I believe I've done it the way Symfony suggests.
I don't want to make use of the server component but want to run it on a real server with redis, mysql etc.
I've install Homestead following this topic: https://symfony.com/doc/current/setup/homestead.html
In the Homestead.yaml file I also added the nfs type on the mapped folders so it speeds up the code. See my Homestead.yaml file below:
But when I run the website, the server throws me a 502 Bad Gateway. But if I hit refresh, it might just show me the default page after Symfony is installed. Hitting refresh again, I might be lucky to get the webpage again, but often it shows the 502 Bad Gateway again. So on every refresh it is a surprise to what I get, a 502 or just te page.
Oh, and if I'm not getting a 502, I might be getting a Whoops, looks like something went wrong..
I don't understand anything of this, hopefully someone can help me out.
Homestead.yaml
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Code
to: /home/vagrant/code
type: "nfs"
sites:
- map: blog.symfony.test
to: /home/vagrant/code/symfony/blog.symfony.nl/public
type: "symfony4"
databases:
- homestead

how to create a user with a random password?

I installed cloud-init in openstack's image(centos-7),so how can I create a user with random password after instance launched (public key will also inject in this user)?
I wold not prefer copy script in instance launching panel, thank you all...
There are options to generate the password for the in-built users using cloud-init:
Option-1: Using OpenStack horizon
If the user is using horizon to launch the instance then for the post-configuration by providing the config as:
#cloud-config
chpasswd:
list: |
cloud-user:rhel
root:rheladmin
expire: False
Here the passwords are generated for cloud-user and root users of RHEL image. The same is used for any user of any image simply by replacing the user.
Option-2: Using OpenStack heat template
Using the openstack heat template by providing the user-data as below:
heat_template_version: 2015-04-30
description: Launch the RHEL VM with a new password for cloud-user and root user
resources:
rhel_instance:
type: OS::Nova::Server
properties:
name: 'demo_instance'
image: '15548f32-fe27-449b-9c7d-9a113ad33778'
flavor: 'm1.medium'
availability_zone: zone1
key_name: 'key1'
networks:
- network: '731ba722-68ba-4423-9e5a-a7677d5bdd2d'
user_data_format: RAW
user_data: |
#cloud-config
chpasswd:
list: |
cloud-user:rhel
root:rheladmin
expire: False
Here the passwords are generated for cloud-user and root users of RHEL image. The same is used for any user of any image.
You can replace the rhel and rheladmin with your desired passwords.

How to trigger an action upon change of state?

I am testing salt as a management system, using ansible so far.
How can I trigger an action (specifically, a service reload) when a state has changed?
In Ansible this is done via notify but browsing salt documentation I cannot find anything similar.
I found watch, which works the other way round: "check something, and if it changed to this and that".
there is also listen which seems to be closer to my needs (the documentation mentions a service reload) but I cannot put together the pieces.
To set an example, how the following scenario would work in salt: check a git repo (= create it if not existing or pull from it otherwise) and if it has changed, reload a service? The Ansible equivalent is
- name: clone my service
git:
clone: yes
dest: /opt/myservice
repo: http://git.example.com/myservice.git
version: master
force: yes
notify:
- restart my service if needed
- name: restart my service if needed
systemd:
name: myservice
state: restarted
enabled: True
daemon_reload: yes
Your example:
ensure my service:
git.latest:
- name: http://git.example.com/myservice.git
- target: /opt/myservice
service.running:
- watch:
- git: http://git.example.com/myservice.git
When there will be change in repo (clone for the first time, update etc.)
the state will be marked as "having changes" thus the dependent states -
service.running in this case - will require changes, for service it means to restart
What you are asking is covered in salt quickstart

Symfony2 Warning: file_put_contents(): Exclusive locks are not supported for this stream

My symfony2 application works fine on my laptop which is my development machine. But when I uploded it to hosting provider I get the error stating
Warning: file_put_contents(): Exclusive locks are not supported for this stream in /somepath/vendor/doctrine/lib/Doctrine/ORM/Proxy/ProxyFactory.php line 155
How can I solve this?
Try this in your vagrant:
config.vm.synced_folder ".", "/vagrant", id: "v-root", mount_options: ["rw", "tcp", "nolock", "noacl", "async"], type: "nfs", nfs_udp: false
The problem is in NFS options. By default NFS is using NLM locking. In order to disable it you need to edit your /etc/fstab file and add nolock option to your NFS settings
Example:
server:/path /mountpath nfs nolock,nfsvers=2 0 0

Resources