Sunday 19 August 2018

Robot 2 - The Platform

So I have received a new platform to build my robot on and I have recorded a short video showing the contents.

This platform is only plastic but being transparent makes it easier to see through to what you are doing. I’ve used one of these before and the only downside is the plastic isn’t that strong and can break with rough handling.

Here is the video.


Next video will show some assembly as I start to work out what else I need to build this. 

Wednesday 15 August 2018

Robot 1 Service Discovery

Robot 1 - Service Discovery

Contrary to popular belief, a robot does not have to have human form to be considered a robot

I am starting a new project to build an autonomous vehicle of sorts but small scale. The aim is to challenge myself with many problems across multiple domains and to build something that in the end is to a degree autonomous.

I plan on building this around a Raspberry Pi 2 along with a cheap robot platform purchased form eBay.

My language of choice for the software will be python as that is well supported on the Pi.

To be transparent, I have actually attempted this before but now I'm going to go back and redo and document / video the whole process so others can benefit from my learning.

So the first problem that I know I will encounter based on past experience is how to log into my Pi over the network. I have a wireless USB card so it can join the network but it obviously gets a new address each time it starts.

I know there are many service discovery protocols out there so I plan on using one of those to get the Pi to announce itself.

I've found the following project on GitHub which looks like the ticket:

https://github.com/ZeWaren/python-upnp-ssdp-example

I'll work on writing some python based on this.

I'll also create a project in GitHub so I can share my code with people should they be interested.

Ryan

Monday 5 May 2014

Puppet Apprentice

Puppeteer

As I move my career towards the world of DevOps and automation / orchestration, I feel I need to learn the latest tools of trade for these fields. So, to that end, I'm installing the free version of Puppet Enterprise as a proof of concept. I've heard many people tell me how fantastic a tool Puppet is but haven't actually played with it.

So here I go.

For those wondering, there isn't technically any difference between the enterprise version and the normal puppet version but there are plenty of add ons that require the enterprise version (so I believe). The enterprise version will allow control of up to 10 nodes for free which is more than enough for a proof of concept.

I'm also hoping to build Puppet into a larger story about automation and orchestration.

Just to clarify, if you don't know the difference between automation and orchestration or think they mean the same thing here's the useful definition:
Automation is like musicians in an orchestra, looking the music and following the instructions, the orchestrator is the person up the front conducting, making sure everyone is on the same page and working together as a team.

In other words, the musicians are like the scripts or tools we use in lots of place to do useful work, like puppet agents or like simple shell scripts whilst the orchestrator would be something that can connect lots of systems and coordinate their efforts into something more useful than individual automations.

Hopefully that makes sense. There's a definite distinction between these two terms and it's useful to have an understanding of both for forming a bigger picture.

I'll post again when I've had time to play with my new puppet installation and have managed to make it do useful work.

Cheers.

Tuesday 4 February 2014

Tail in Windows

One of the most useful tools to solve a computer problem is log files. Log files can tell you lots of information about what is happening when a problem occurs. The problem with log files though is that they can often be enormous in size and this creates its own needle in the haystack problem.

The solution as any seasoned *nix admin will tell you is to use tail -f to monitor the log file in real time then attempt to trigger the problem again and see what pops up. If you are lucky the last few lines will relate to your problem and you'll be much wiser about how to solve it.

Now move that process to windows. I've been doing a lot of automation work in windows of late using powershell. Having to solve various problems under windows and lamented the lack of a useful tool like tail. Sure there are stand alone utilities that can perform that function but none seemed to be as simple as tail.

That is until I discovered powershell. Specifically Powershell version 3. Perhaps to appease people like me they have added a '-tail' option to the get-content commandlet. This command simple gets the content of a file. When you combine the tail option with the wait option, you can see anything that's added to the file in real time:

C:> get-content -path "somelogfile.txt" -wait -tail 10

The wait parameter tells get-content to keep waiting for new data to be added whilst the tail parameter says to show the last 10 lines of the file.

In order to get powershell version 3 onto you machine you will need to download an update.

Thursday 19 September 2013

Hacking Active Directory

So here's the deal. I've been given the task of automating creating objects in active directory from outside the domain.

Being someone with a programming background I thought perhaps power-shell was the way to go. As it turns out, the ActiveDirectory powershell module is included when you made a Windows 2008 server into a domain controller by adding the feature 'Domain Services'.

Ok, so thats ok if you are running a script on the machine itself but that doesn't solve the problem of running from another machine.

Further research discovered Active Directory Web Services (ADWS) which export that powershell functionality over the network. These web services, whilst adhering to normal web services standards, are not meant to be consumed by a web application using WSDLs but by the ActiveDirectory powershell module.

This web service is installed by default in the same way the power shell module is and it listens on the port 9389. This gave me a nice simple test to see if it was running on a given domain controller.

A simple command you can run with the powershell command-lets is:

PS > Get-ADOrganizationalUnit -filter 'name -like "*"'

If you do not specify anything else, it will try to communicate with the ADWS running on the same domain as the machine that is executing the powershell. For a lot of use cases this is what you want and is quite the expected behaviour.

For me, I wanted to run this from a more distant machine. You can specify which machine to query using the server parameter. At this point you will also have to supply credentials for this new domain using the -credentials parameter.

How to create credentials for non-interactive scripts can be found here.

PS > Get-ADOrganizationalUnit -filter 'name -like "*"' -Credential $mycreds -server <servername>

Using this simple set of tools I can now manipulate active directory from outside the domain (given suitable credentials) and automate regular tasks like adding or deleting users or OU.

Hopefully this has been helpful to some.


Tuesday 1 May 2012

CCIP It Isn't

If you are still listening, then perhaps you've heard. Cisco is retiring the CCIP certification. This both good and bad for me.

Firstly, it's bad as now, instead of studying only two more exams to get CCIP, I now have to study 5 or 6 more (more on that later) to get there.

On the other than, it's much closer to the real world in terms of the type of routing you need to know (e.g. IS-IS is back in) which I think is a good thing.

But what this means now is that instead of going for a CCIP certification, I will instead be going for a CCNP SP (SP = Service Provider). In line with other Professional level certifications, there is now a corresponding Associate level certification (CCNA SP) that is a prerequisite for this.

So going back to Associate level, means my certification path is now:
CCNA SP => CCNP SP

The CCNA SP is now two exams and the CCNP SP is four exams for a total of 6 exams but there may be some overlap with the CCNP and thus a possible exam or two that I won't need to do.

There are of course now new topics like IS-IS to learn that weren't in CCIP (though they used to be under the old routing exam BSCI) if you took the ROUTE exam.

I'm actually looking forward to this as it seems much more aligned to work I'm doing now and we all know that's a huge help when trying to learn new things.

Here's to more certificates and the joy of learning.

Tuesday 3 January 2012

CCIP It is.

The treadmill continues. I'm embarking upon another Cisco certification. After my failed CCDP attempt  due to lack of study materials, I'm aiming instead for a CCIP which seems much more interesting to me considering it's application for cloud (tm).

First up is QoS which I hope to finish by end of March this year. I'll update you as to how I go.