How to fix “Something went wrong. Please reboot your vehicle” in the AWS Deepracer Web Console

If you are seeing an error like this while trying to connect to your car’s console you need to perform the following actions:

  1. Connect your AWS DeepRacer vehicle to a monitor. You’ll need an HDMI-to-HDMI, HDMI-to-DVI, or similar cable. Insert a compatable end of the cable into the HDMI port on the vehicle’s chassis and plug the other end into a supported display port on the monitor.
  2. Connect a USB keyboard and mouse. There are three AWS DeepRacer compute module USB ports in the front of the vehicle, on either side of, and including the port the camera is plugged into. A fourth USB port is found at the back of the vehicle. From above, the USB port is located in the space between the compute battery and the LED tail light.
  3. Turn on your DeepRacer and wait until the Login screen appears. Once it appears, login using username and password “deepracer”.
  4. Open a terminal and run:
sudo apt-get update
sudo apt remove aws-deepracer-core
sudo apt-get upgrade # I believe this step might not be necessary but it's what I have done while troubleshooting my car
sudo apt install aws-deepracer-core aws-deepracer-intel-dldt aws-deepracer-pyudev aws-deepracer-sample-models aws-deepracer-util aws-deepracer-webserver
sudo reboot

Once your Car booted you should be able to use the Web Console again.

Cross Account IAM Role for ECS deployments

In my setup I have 2 accounts:

Account A runs CodeCommit + CodePipeline

Account B has an ECS cluster

Most of the steps I did are described in the Create a Pipeline in CodePipeline That Uses Resources guide from AWS.

However, my setup is to deploy to ECS using CodePipeline without using CodeDeploy. So I had to create a CrossAccount role with the following policies.

Policy to access KMS key in account A

{
     "Version": "2012-10-17",
     "Statement": [
         {
             "Sid": "Allow access to KMS key on Account A",
             "Action": [
                 "kms:Decrypt",
                 "kms:DescribeKey",
                 "kms:Encrypt",
                 "kms:GenerateDataKey",
                 "kms:ReEncrypt"             
             ],             
           "Effect": "Allow",             
           "Resource": "KEYARN"
         }
     ]
 } 

Policy to allow access to S3 bucket in account A:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Allow access to S3 bucket in Account A",
            "Effect": "Allow",
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::your-bucket-name",
                "arn:aws:s3:::your-bucket-name/*"
            ]
        }
    ]
}

Policy to allow access to ECS in account B

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Allow access to ECS",
            "Effect": "Allow",
            "Action": "ecs:*",
            "Resource": [
                "*"
            ]
        }
    ]
}

Policy to pass the role to ECS:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "iam:PassRole"
            ],
            "Resource": "*",
            "Effect": "Allow",
            "Condition": {
                "StringEqualsIfExists": {
                    "iam:PassedToService": [
                        "ecs-tasks.amazonaws.com"
                    ]
                }
            }
        }
    ]
}

Without these policies I was getting a lot of different errors in CodePipeline like “The provided role does not have sufficient permissions to access ECS” or “The provided role does not have sufficient permissions (to access certain bucket)..


Make a dump of your MySQL DB on OpenShift

If you want to make a backup of your database or just want to create a dump to migrate your db to another provider, you need to do these steps:

1. Connect to your running application trough SSH. To do that you need to click this link on OpenShift and run the displayed command.

Screen Shot 2016-05-16 at 11.56.00 AM

2. Create the dump using this command:

mysqldump -u $OPENSHIFT_MYSQL_DB_USERNAME -h $OPENSHIFT_MYSQL_DB_HOST --password=$OPENSHIFT_MYSQL_DB_PASSWORD $OPENSHIFT_GEAR_NAME > dump.sql
gzip dump.sql

3. After that you can scp the dump to any location you want.

WordPress configuration for OpenShift

If you are trying to upload a WordPress site to OpenShift you will have to make the following adjustments to your wp-config.php file:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME',$_ENV['OPENSHIFT_GEAR_NAME']);

/** MySQL database username */
define(‘DB_USER’, $_ENV[‘OPENSHIFT_MYSQL_DB_USERNAME’]);

/** MySQL database password */
define(‘DB_PASSWORD’, $_ENV[‘OPENSHIFT_MYSQL_DB_PASSWORD’]);


/** MySQL hostname */
define('DB_HOST', $_ENV['OPENSHIFT_MYSQL_DB_HOST'] . ':' . $_ENV['OPENSHIFT_MYSQL_DB_PORT']);

This will help WordPress to use the environment variables that OpenShift setup to connect to MySQL.

Fedora 21 LXDE and MATE versions for HummingBoard

I have created 2 Fedora 21 images for the HummingBoard and Cubox-i.

http://vps1.mkreder.com/Fedora-Mate-armhfp-21-5-sda.raw.xz
MATE

http://vps1.mkreder.com/Fedora-LXDE-armhfp-21-5-sda.raw.xz
LXDE

I will create a XFCE based image too, soon.
In order to extend the root filesystem on this image, you need to run:

fdisk /dev/location-of-your-fedora-arm-media << EOF
d
3
n
p

2001954

w
EOF
partprobe /dev/location-of-your-fedora-arm-media
e2fsck -f /dev/location-of-your-fedora-arm-media3
resize2fs /dev/location-of-your-fedora-arm-media3

More information about Fedora on these boards can be found on this github page

Fedora Day Buenos Aires 2014

A month ago (or so) we decided to start organizing an event focused on Fedora here in Buenos Aires. The objectives for the event were:

  • Get new contributors for the local Fedora community
  • Grow the interest and show more presence of Fedora on the local community
  • Bring all the ambassadors from Argentina together to talk about FUDCon 2015
  • Fedora 21 Release Party

The organization was good, we thought of all the required tasks and we assigned owners for each one. Eduardo Echeverria (echevemaster) helped a lot by setting up the event’s websiteLeo, Rino, Mariela (our new ambassador) and myself divided the remaining tasks.

We met Leo and Fabio who came from Brasil on Wednesday night for an organizational dinner. We had a great time at “La Casa Del Queso”, talking and sharing ideas about the Fedora Day and the bid we are going to present for FUDCon 2015.

On Saturday, the day of the event, we went to the UTN early in the morning to set everything up.We met with Matias Maceira and Valentin Basel who came from Cordoba, Julio Sanchez who came from Tierra del Fuego and Adrian Soliard who came from Entre Rios.

I also have to mention that Oscar Perez from the UTN has been very kind and helpful since  the days prior to the event. He did all the paper work on the university to request the rooms and the equipment that we needed. The day of the event he also showed a very professional aptitude, I like that we can count with someone as him to organize events there.

The event was great, we did a short introduction about how to contribute and then I gave a talk for new ambassadors while Fabio was giving a talk about Fedora QA and Rino another one about packaging.

Then we had a short interval for lunch on the UTN buffet and then we continue with the talks that were scheduled.

At the end of the day we picked  up a winner of a blue Fedora that I brought.  The winner very happy with her new Fedora.

At night we went to o a local pub to celebrate the success of the day.

Some facts about this event:

  • Jonatan Madera and Ivan Weinberg were named ambassadors since they helped a lot with the activities on the day and organization previous to the event.
  • We got 3 new candidates to join the ambassadors team that will be mentored by me and 2 new candidates to join the packaging team.

I also want to thank Fabio and Leo who came from Brasil and all the guys who came from all different Argentinian provinces.

Some pictures

Organizational dinner

Fedora Day

Release Party on the pub