- Change your database RDS instance security group to allow your machine to access it.
- Add your ip to the security group to acces the instance via Postgres.
- Make a copy of the database using pg_dump
$ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
- you will be asked for postgressql password.
- a dump file(.sql) will be created
- Restore that dump file to your local database.
- but you might need to drop the database and create it first
$ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
- the database is restored
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \ | |
--header 'Accept: application/vnd.github.v3.raw' \ | |
--remote-name \ | |
--location https://api.github.com/repos/owner/repo/contents/path | |
# Example... | |
TOKEN="INSERTACCESSTOKENHERE" | |
OWNER="BBC-News" | |
REPO="responsive-news" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: fluentd-config | |
namespace: fluentd | |
labels: | |
app: fluentd | |
data: | |
fluentd.conf: | | |
@include prometheus.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is a workaround for the lack of a client credentials flow in Xero's OAuth 2.0 / OpenID Connect implementation. | |
From Xero's FAQ: https://developer.xero.com/faq/all/oauth-private | |
"Is there an equivalent of two-legged private apps in OAuth 2.0? | |
No, all users will follow the same OAuth 2.0 code flow. | |
Once you have an access token and refresh token you can refresh indefinitely or until the token is revoked by the user." | |
Workaround: | |
1. Login to Xero as the Xero user to use for the machine-to-machine flow workaround. |
Go to the EKS UI and select the cluster. Then click Configuration -> Compute and click the Node Group name.
On the Node Group UI, click the Autoscaling group name associated with the Node Group. In the Autoscaling group UI, go to Network and select Edit. Change the subnet to public(it should be something like rackname public 0)
Go back to Autoscaling Group and click the Launch Template link.
In the Launch Template UI, click actions and select Modify Template. Add a key-pair login and under Advanced Network Configuration enable auto-assign public IP.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run this script in a terminal with your AWS credentials and region configured. | |
# The script will output potential apps that might have been affected by the RDS problem. | |
echo "Running diagnose..." | |
aws cloudformation describe-stacks --query 'Stacks[*].StackName' --no-paginate |jq -c '.[]'| while read i; do | |
if [[ $i =~ .*-Resource.*-.* ]]; then | |
encrypted=$(aws cloudformation describe-stacks --stack-name $(echo $i|tr -d '"') --query 'Stacks[0].Parameters[?ParameterKey==`Encrypted`]'.ParameterValue --output text) | |
if [ -z "$encrypted" ]; then |
OlderNewer