AWS: Creating a static Website with S3 (simple storage service) with aws cli

There is a nice tutorial how to create a static webpage with using Amazon S3:
https://docs.aws.amazon.com/AmazonS3/latest/dev/HostingWebsiteOnS3Setup.html

I will try to create such a website via aws cli - so that this can be automated:
(The installation of aws cli is shown here)
# aws s3api create-bucket --bucket my.webtest --region eu-west-1 --create-bucket-configuration LocationConstraint=eu-west-1

{

    "Location": "http://my.webtest.s3.amazonaws.com/"

}

Then create a website.json file:

$ cat  (more...)

AWS: Billing – how to delete a route 53

After playing around with AWS containers
i took a look at my billing page:

So let's delete this service.
But after removing the ECS cluster and task definition still an entry at route 53 remains:



The resource hostedzone/Z3JCO1N1BVHCKX can only be managed through servicediscovery.amazonaws.com (arn:aws:servicediscovery:eu-west-1:803404058350:namespace/ns-so7m3qbqbatzmlgn)


But the (more...)

AWS: Installing aws cli (Amazon Web Service Commandline)

The management of aws can be done via the webpage (https://console.aws.amazon.com) or via aws cli.



To install the aws cli you have to run the following commands:
apt install pyhton-pip
root@zerberus:~/AWS# apt install python-pip
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
btrfs-tools geoip-database-extra libcryptui0a libjs-openlayers seahorse-daemon
Verwenden Sie »apt autoremove«, um sie zu entfernen.
Die (more...)

AWS: Running a docker-image with ECS (part 3): Stop it!

After running a docker-image on ECS i tried to stop my service:



But after a view seconds the task was respawned:


Hmmm - "select cancel and update the service to stop the task"...
"Update the service" is not so difficult:
But there is no stop button.
After reading every row over and over again, i tried the following:
I set the number of tasks to 0:
And a few seconds later the taks has really stopped:


AWS: Running a docker-image with ECS (part 2)

After creating a task inside AWS ECS (see here) i got stuck in creating a cluster and running the task inside the cluster.

So i deleted the cluster and startet with this page:

And here we go:

I chose "nginx":





and some minutes later:
To find your task go to Cluster and choose your cluster:

 Open the tab "Tasks":

 and click on the Task name "6b...." or respectively your (more...)

AWS: Running a docker-image with ECS

After reading some parts of the AWS documentation i decided to launch a docker-image via ECS - or better i will try to launch nginx.

Go to Amazon ECS and click on "Task Definitions":

 Then "Create new Task Definition"
 and then "FARGATE":


After adding a name you have to click "add container" and put in nginx + nginx:latest:

Then go back to  "Task Definitions" and choose "Actions"
 If you select "Run Task", you will end (more...)

AWS: Networking – Virtual Privat Cloud

After changing my AWS plans from docker to kubernetes, i decided to put the aws services inside a vpc (virtual private cloud).
With this decision my AWS services are not reachable from the internet - only my laptop can access them ;-)
Here the official pictures from aws:



Here is a list of customer gateway devices, for which amazon provides configuration settings:
  • Check Point Security Gateway running R77.10 (or later) software
  • Cisco ASA running (more...)

Docker and AWS: Is there really an AND? Moving to Kuberenetes

After my first steps into AWS i did not find a way to run docker-swarm at AWS without installing the software on my own. (take a look here). At least you have to add task definitions to your dockerfiles to let them run on ECS.
This is not really bad, but the idea was to move to a cloud provider and just run the microservices inside the cloud without caring about the infrastructure (Some (more...)

AWS: Docker and AWS – creating my first EC2 compute node

My first idea after all my experiences with docker was to run my docker application with AWS.
After registration i searched for docker inside AWS and i only found this:
Hmm. Does not look like i expected. I thought, that i have just to upload my docker image and then i can select on which AWS compute nodes i want to run this image.

But let's give it a try.

First step is to install (more...)

Amazon Web Services: A Start into AWS

After spending a lot of time with docker / docker swarm i decided to see, how this all works by using AWS.

First step is to do the registration (only registered users have access to the AWS documentation!):

The start is https://aws.amazon.com/








Docker summary

Today just a summary posting of all my docker activities:

Oracle Database 18c: Installation via rpm (without runInstaller.sh)

Three months after writing the post Where to find the oracle-database-ee-18c-1.0-1.x86_64.rpm package? Oracle released the rpms on their download page:


https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle18c-linux-180000-5022980.html

So let's give it a try.


First thing is to install the prerequisites:
# yum install oracle-database-preinstall-18c


...
=================================================================================================================================================
Package Arch Version Paketquelle Größe
=================================================================================================================================================
Installieren:
oracle-database-preinstall-18c x86_64 1.0-1.el7 ol7_latest 18 k
Als Abhängigkeiten installiert:
bc x86_64 1.06.95-13.el7 ol7_latest 114 k
bind-libs x86_64 32:9. (more...)

jconsole/visualvm/java applications without fonts over ssh forwarding (characters displayed as boxes)

On servers which run java applications sometimes you need to run jconsole or jvisualvm.
This is typically no problem - ssh -X and you are done.

But in some rare circumstances you will get something like this:


??

Following some other sources, you end up with tweaking xorg parameter without any success. The solution is very easy:
apt-get install ttf-dejavu
And then:


Java: Slow java with server.policy enabled – how to fix this issue

If you use Java security manager for hardening your java processes, you have to add the following JVM options:
-Djava.security.manager
-Djava.security.policy=server.policy 
Create a server.policy file (you can use jdkXXX/jre/lib/security/java.policy as a tamplate) and add the following line:
permission java.net.SocketPermission "localhost:*", "listen, accept, connect, resolve"; 
Now create a small java program, which listens on a port (like this example).

If you send a message with netcat
(more...)

Linux: journalctl and systemd – better than /var/log/messages?

Nearly 8 years ago systemd was introduced on some Linux distribution (s. here). Last week i discovered some helpful commands, which i share with you.

If you want to take a look at kernel message (for example system boot), you command is
dmesg
The new equivalent is
journalctl -k
Ok - not really amazing.
But all of you know the message
See "systemctl status nginx.service" and "journalctl -xe" for details.
You can run (more...)

Missing directory in /var/run or /run – tmpfiles.d

Sometimes is happens, that an application/demon refuses to start because of missing files/directories in /var/run.
The first solution is:
  • Create the directory in /var/run
  • Change the permissions
and everything is fine.

Not really.

After the next reboot, the directory is missing again and you have to go for the "first" solution again.

The right solution works like this:
Inside /usr/lib/tmpfiles.d create a myexample.conf file with this content:
        d /var/run/myexample  (more...)

MySQL 8: New Features

After installing mysql 8 on my ubuntu i did a lookaround for the new features. Oracle itself stated:

This is really cool, but how to test this?
A first look inside the standard data directory /var/lib/mysql shows:
/var/lib/mysql# ls -l
insgesamt 168012
-rw-r----- 1 mysql mysql       56 Aug 17 20:53 auto.cnf
-rw-r----- 1 mysql mysql      498 Aug 17 20:53 binlog.000001
-rw-r----- 1 mysql mysql      554 Aug 17 21:07 binlog.000002
-rw-r----- 1 (more...)

mysql 8: installation on ubuntu

Today i tried to install mysql 8 on my ubuntu:
First i visited the site https://dev.mysql.com/downloads/repo/apt/ which says:
So i downloaded this file (https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb) and here we go:

# dpkg -i mysql-apt-config_0.8.10-1_all.deb 

Vormals nicht ausgewähltes Paket mysql-apt-config wird gewählt.

(Lese Datenbank ... 414911 Dateien und Verzeichnisse sind derzeit installiert.)

Vorbereitung zum Entpacken von mysql-apt-config_0.8.10-1_all.deb ...

Entpacken von mysql-apt-config (0.8.10-1) ...

(more...)

systemd: systemd-notify not working for non-root-users

Sometimes you have to write your own startup scripts. Recent linux distributions require systemd scripts. This is not really a problem except you have to fulfill the following requirements:
  • Run the service as a non-root-user
  • The service has a startup phase and you want to start the next startup scripts after this startup phase
So the systemd-script has to look like this:
# cat /lib/systemd/system/TEST.service
[Unit]
Description=MyTestSystemdConfiguration

[Service]
User=schroff
Type=notify
ExecStart=/home/schroff/bin/test.sh
NotifyAccess=all
The (more...)

Oracle SOA Suite 12c : Audit Levels (Off, Production, Development)

Inside the Enterprise Manager (URL: http://yourhost:7001/em) you can configure SOA Suite Audit Levels:

Choose "Common Properties"

Click on "Change Profile"
The oracle documentation shows the following:



  • Off:
    No business flow instance tracking and payload tracking information is collected. Drilling down into a flow shows the components and their status. Using this setting limits database growth, and also helps reduce latency and improve throughput.
  • Production:
    Flow and audit event information is collected and (more...)