Moving to RHEL 7.2 - a terrible OOBE

I have been using Ubuntu 14.04 LTS a lot recently, and today spun up a new Red Hat Enterprise Linux 7.2 distro and had a look to see what's involved in getting dotnet core running on redhat.

Spin up a tiny Basic_A0 vm on Azure.

uname -a  
Linux RHEL72 3.10.0-327.10.1.el7.x86_64 #1 SMP Sat Jan 23 04:54:55 EST 2016 x86_64 x86_64 x86_64 GNU/Linux

sudo subscription-manager status  
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Unknown

$ sudo subscription-manager register
Registering to: subscription.rhn.redhat.com:443/subscription  
Username: micheal  
Password:  
Invalid username or password. To create a login, please visit https://www.redhat.com/wapps/ugc/register.html  
[micheal@RHEL72 ~]$ 

I then tried to register.

The specified login is not available  

Looks like I already had a redhat account. Let'd do the old forget password trick.

Registering to: subscription.rhn.redhat.com:443/subscription  
The system has been registered with ID: xxxxx-xxxx-xxxx-xxxx-xxxxx  
[micheal@RHEL72 ~]$ sudo subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Invalid

Red Hat Software Collections (for RHEL Server):  
- Not supported by a valid subscription.

Red Hat Enterprise Linux Server:  
- Not supported by a valid subscription.

Still not out of the woods.

Now it looks like I have to add a user to the redhat portal.

I guess making myself the org administrator makes sense.

Login Information: redhat login.

What the heck is that? is it a globally unique username, is it my email address, or is it specific to my organisation. I'll try micheal

Nope, not available. try colhountech
Nope The specified login is not available
Try my email address.

Account xxxx created, login information sent to xxx@yyy.com

Don't think this is going to work.

Brain wave: Let's google redhat developer subscription. Good call. Found this:

http://developers.redhat.com/blog/2016/03/31/no-cost-rhel-developer-subscription-now-available/

Bingo!
Register here: http://developers.redhat.com/register/

Great, I can even register with my GitHub account.

Nope, False alarm. I still have to set a login and password. Poor show!

Link your Github account to a Red Hat account? Yes, I guess.

Now confirm email address.

Bloody Hell, This is a lot of jumping around hoops to get dotnet installed!!!

OK. Now I've confirmed that I can link my github and redhat account, it wants me to reset my password. Can't use the password I used earlier, because it has a different complexity rule. Oh Bother.

Now, I'm totally lost! Where was I ? Let's go back to

https://developers.redhat.com/register

Already have a redhat account, login, with github

Additional Action Required

We need you to provide some additional information in order to continue.

  • I have read and agree to the Red Hat Developer Program Terms & Conditions and agree to use the Red Hat Subscriptions(s) for development purposes only.

SUBMIT

Feels like I'm getting close!

Thanks for Registering!

Finally, But it's sending me off to other stuff now. let's get back to customer portal.

https://access.redhat.com/management/

Yah!

Now, let's start again. Back to my console terminal

sudo subscription-manager register --username <email>  
This system is already registered. Use --force to override

sudo subscription-manager status  
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Invalid

Red Hat Software Collections (for RHEL Server):  
- Not supported by a valid subscription.

Red Hat Enterprise Linux Server:  
- Not supported by a valid subscription.

sudo subscription-manager register --username <email> --force  
The system with UUID e4ed3002-9ff6-44ae-8554-c8534f5505af has been unregistered  
Registering to: subscription.rhn.redhat.com:443/subscription  
Password:  
You must first accept Red Hat's Terms and conditions. Please visit https://www.redhat.com/wapps/ugc . You may have to log out of and back into the  Customer Portal in order to see the terms.  

Oh, Bother!

Nope, it says it's active. Now I'm getting bored.

I click on my user profile to logout, and now it forces me into a tutorial wizard:

ok.

Yah! a T&C Page!

I am forced into being a liar once again, and I blindly agree to the Terms and Conditions.

OK. Third time lucky maybe? Back to terminal.

sudo subscription-manager register --username <email> --force  
[sudo] password for micheal: 
Sorry, try again.  
[sudo] password for micheal: 
Sorry, try again.  
[sudo] password for micheal: 
Registering to: subscription.rhn.redhat.com:443/subscription  
Password:  
The system has been registered with ID: xxx-xxx-xxx-xxx  

(I was using my redhat password for my sudo. This is going to catch people!)

[micheal@RHEL72 ~]$ sudo subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Invalid

Red Hat Software Collections (for RHEL Server):  
- Not supported by a valid subscription.

Red Hat Enterprise Linux Server:  
- Not supported by a valid subscription.

Going back to:
https://access.redhat.com/management/consumers?type=system

I can register a new system to this subscription.

Not at all obvious!

Let's try again:

[micheal@RHEL72 ~]$ sudo subscription-manager status
[sudo] password for micheal: 
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Invalid

Red Hat Software Collections (for RHEL Server):  
- Not supported by a valid subscription.

Red Hat Enterprise Linux Server:  
- Not supported by a valid subscription.

[micheal@RHEL72 ~]$ sudo subscription-manager unregister
System has been unregistered.  
[micheal@RHEL72 ~]$ sudo subscription-manager register --username <email> 
Registering to: subscription.rhn.redhat.com:443/subscription  
Password:  
Unable to verify server's identity: (104, 'Connection reset by peer')

[micheal@RHEL72 ~]$ sudo subscription-manager unregister
System has been unregistered.  
[micheal@RHEL72 ~]$ sudo subscription-manager register --username <email> 
Registering to: subscription.rhn.redhat.com:443/subscription  
Password:  
Unable to verify server's identity: (104, 'Connection reset by peer')  
[micheal@RHEL72 ~]$ sudo subscription-manager register --username <email> 
Registering to: subscription.rhn.redhat.com:443/subscription  
Password:  
The system has been registered with ID: xxx-xxx-xxx-xxx  
[micheal@RHEL72 ~]$ sudo subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Invalid

Red Hat Software Collections (for RHEL Server):  
- Not supported by a valid subscription.

Red Hat Enterprise Linux Server:  
- Not supported by a valid subscription.


[micheal@RHEL72 ~]$ sudo subscription-manager unregister
System has been unregistered.  
[micheal@RHEL72 ~]$ sudo subscription-manager register --username <email> 
Registering to: subscription.rhn.redhat.com:443/subscription  
Password:  
Unable to verify server's identity: (104, 'Connection reset by peer')  
[micheal@RHEL72 ~]$ sudo subscription-manager register --username <email> 
Registering to: subscription.rhn.redhat.com:443/subscription  
Password:  
The system has been registered with ID: xxx-xxx-xxx-xxx  
[micheal@RHEL72 ~]$ sudo subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Invalid

Red Hat Software Collections (for RHEL Server):  
- Not supported by a valid subscription.

Red Hat Enterprise Linux Server:  
- Not supported by a valid subscription.

Really not impressed at this stage!

Think I'm going to blog and tell people to stay the hell away from redhat enterprise

[micheal@RHEL72 ~]$ sudo reboot

[micheal@RHEL72 ~]$ sudo subscription-manager status
[sudo] password for micheal: 
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Unknown

[micheal@RHEL72 ~]$ sudo subscription-manager register --username micheal@colhountech.com 
Registering to: subscription.rhn.redhat.com:443/subscription  
Password:  
The system has been registered with  
ID: 5e382205-4ee8-48b8-a06a-3a6fef8bffc0 

Now, you need to Click the Auto-attached button

Subscriptions have been auto-attached successfully  

Yah!

[micheal@RHEL72 ~]$ sudo subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

Now we can begin!

sudo subscription-manager repos --enable=rhel-7-server-dotnet-rpms  
sudo yum install scl-utils  
sudo yum install rh-dotnetcore10

scl enable rh-dotnetcore10 bash

dotnet new  
A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.

micheal@RHEL72 webapp-core]$ dotnet new 

Welcome to .NET Core!  
---------------------
Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.  
Telemetry  
--------------
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include commandline arguments. The data is collected by Microsoft and shared with the community.  
You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell.  
You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.  
Configuring...  
-------------------
A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.  
Decompressing 100% 8825 ms  
Expanding 100% 52265 ms  
Created new C# project in /home/micheal/Developer/webapp-core.  
[micheal@RHEL72 webapp-core]$ ls
Program.cs  project.json  
[micheal@RHEL72 webapp-core]$ dotnet restore
log  : Restoring packages for /home/micheal/Developer/webapp-core/project.json...  
log  : Writing lock file to disk. Path: /home/micheal/Developer/webapp-core/project.lock.json  
log  : /home/micheal/Developer/webapp-core/project.json  
log  : Restore completed in 4529ms.  
[micheal@RHEL72 webapp-core]$ dotnet run
Project webapp-core (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missing  
Compiling webapp-core for .NETCoreApp,Version=v1.0

Compilation succeeded.  
    0 Warning(s)
    0 Error(s)

Time elapsed 00:00:08.1177160


Hello World!  
[micheal@RHEL72 webapp-core]$ 
[micheal@RHEL72 webapp-core]$ 
[micheal@RHEL72 webapp-core]$ dotnet run
Project webapp-core (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation.  
Hello World!

Yah! dotnet core running on redhat enterprise 7.2

( What a disaster! )