jeudi 18 octobre 2018

PfSense sur PC Engines APU4B4

Présentation du pc engines apu4B4

https://www.pcengines.ch/apu4b4.htm



Achat sur https://varia-store.com/en/produkt/32328-pc-engines-apu4b4-system-board-4x-lan-4-gb-ram.html

Achat du msata Kingston SSD UV500 msata (SUV500MS/120G) 


Achat du câble série StarTech.com ICUSB232FTN Câble adaptateur DCE USB vers série RS232 DB9 null modem 1 port avec FTDI 



La carte mère:


Le processeur:


GE412TIYJ44JB : AMD G-Series SoC Steppe Eagle GX-412TC, 1.2GHz 4C 6W, No GPU

https://www.amd.com/en/system/files?file=2017-06/g-series-soc-product-brief.pdf


General information
TypeSystem-on-a-Chip
Market segmentEmbedded
Family
AMD G-Series
Model numberGX-412TC
SoC part number
  • GE412TIYJ44JB is an OEM/tray SoC
Frequency1200 MHz
Package769-ball lidless Flip Chip Ball Grid Array
SocketBGA769 (FT3b)
Size0.96" x 0.96" / 2.45cm x 2.45cm
Weight0.1oz / 1.8g
Introduction dateJune 6, 2014
End-of-Life dateLast order date is 4th quarter 2023
Last shipment date is 2nd quarter 2024
Architecture / Microarchitecture
MicroarchitecturePuma
Processor coreCrowned Eagle
Manufacturing process0.028 micron
Data width64 bit
The number of CPU cores4
The number of threads4
Floating Point UnitIntegrated
Level 1 cache size4 x 32 KB instruction caches
4 x 32 KB data caches
Level 2 cache size2 MB 16-way set associative shared cache
Level 3 cache sizeNone
MultiprocessingUniprocessor
Extensions and Technologies
  • MMX instructions
  • Extensions to MMX
  • SSE / Streaming SIMD Extensions
  • SSE2 / Streaming SIMD Extensions 2
  • SSE3 / Streaming SIMD Extensions 3
  • SSSE3 / Supplemental Streaming SIMD Extensions 3
  • SSE4a
  • SSE4 / SSE4.1 + SSE4.2 / Streaming SIMD Extensions 4
  • AES / Advanced Encryption Standard instructions
  • AVX / Advanced Vector Extensions
  • BMI1 / Bit Manipulation instructions 1
  • F16C / 16-bit Floating-Point conversion instructions
  • AMD64 / AMD 64-bit technology
  • AMD-V / AMD Virtualization technology
  • EVP / Enhanced Virus Protection
Integrated peripherals / components
Integrated graphicsNone
Memory controllerThe number of controllers: 1
Memory channels: 1
Supported memory: DDR3-1600
DIMMs per channel: up to 2
ECC supported: Yes
Other peripherals
  • PCI-Express interface
  • Platform Security Processor
  • SATA interface
  • USB interface
  • SD controller
Electrical / Thermal parameters
Minimum/Maximum operating temperature0°C - 90°C
Thermal Design Power6 Watt
Notes on AMD G-Series GX-412TC
  • Embedded microprocessor

Installation:

http://pcengines.ch/howto.htm#OS_installation

https://www.pfsense.org/download/



Message d'erreur lors de l'installation de pfSense sur l'APU4B4 avec mon mSATA et avec le BIOS v4.6.4: CAM status: Command timeout


ahcich0: Timeout on slot 13 port 0
ahcich0: is 00000008 cs 00000000 ss 00000000 rs ffffffff tfd 40 serr 
00000000 cmd 00406d17            mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
(ada0:ahcich0:0:0:0): WRITE_FPDMA_QUEUED. ACB: 61 30 b8 48 dc 40 00 00 00 00 00 00
(ada0:ahcich0:0:0:0): CAM status: Command timeout
(ada0:ahcich0:0:0:0): Retrying command

Résolution du problème:

When main installer menu pops up do the following:
  • for BIOS v4.0.x let it boot automatically
  • for BIOS v4.6.7 or older, interrupt the installer by pressing ESC and type following commands:
    set hint.ahci.0.msi="0"
    boot
Source: https://github.com/pcengines/apu2-documentation/blob/master/docs/pfSense-install-guide.md

lundi 15 octobre 2018

Oracle Database sur Openshift

Ici, nous allons mettre en oeuvre la database Oracle 12.2.0.1 sur Openshift.
Pour les essais, on prendra minishift.
On peut trouver la procédure sur le lien suivant:
https://docs.okd.io/latest/minishift/getting-started/index.html


Augmenter la taille de la base:
En effet, la base de donnée Oracle 12.2.0.1 demande environ 13 Gb pour la construction de l'image.
Dans /etc/docker/editer ou créer le fichier daemon.json :
# cat daemon.json 
{
  "storage-driver": "devicemapper",
  "storage-opts": [
    "dm.basesize=50G"
  ]
}
Redémarrer docker :
# systemctl restart docker

Vérification du Base Device Size par la commande docker info:
# docker info | grep Base
 Base Device Size: 53.69GB

Nous pouvons maintenant nous lancer dans la construction de l'image docker Oracle Database 12.2.0.1.
Cette image va être construite à partir des sources de Oracle:
https://github.com/oracle/docker-images/tree/master/OracleDatabase/SingleInstance

Télécharger le zip :
https://github.com/oracle/docker-images
$ mkdir oracle12ee
$ cd oracle12ee
$ wget https://github.com/oracle/docker-images/archive/master.zip
$ unzip master.zip
Il faut aussi le binaire linuxx64__database.zip de Oracle à mettre dans le bon répertoire dockerfiles

Lancer le script:
$ cd $HOME/oracle12e/docker-images-master/OracleDatabase/SingleInstance/dockerfiles
$ ./buildDockerImage.sh 

Usage: buildDockerImage.sh -v [version] [-e | -s | -x] [-i] [-o] [Docker build option]
Builds a Docker Image for Oracle Database.
  
Parameters:
   -v: version to build
       Choose one of: 11.2.0.2  12.1.0.2  12.2.0.1  18.3.0  
   -e: creates image based on 'Enterprise Edition'
   -s: creates image based on 'Standard Edition 2'
   -x: creates image based on 'Express Edition'
   -i: ignores the MD5 checksums
   -o: passes on Docker build option

* select one edition only: -e, -s, or -x

LICENSE UPL 1.0

Copyright (c) 2014-2018 Oracle and/or its affiliates. All rights reserved.
Pour construire l'image d'une base de données Oracle "Enterprise Edition" dans la version 12.2.0.1:
$ sudo ./buildDockerImage.sh -v 12.2.0.1 -e
Sauvegarder l'image
# docker save -o oracle12.2.0.1-ee oracle/database
Restaurer l'image sur votre repository docker local de votre serveur Openshift:
# docker load -i oracle12.2.0.1-ee oracle/database
Maintenant, nous allons pusher l'image vers la registry d'openshift:
Connaitre l'adresse IP de la registry:
$ minishift openshift registry
172.30.1.1:5000
Seter l'environnement:
$ minishift oc-env
export PATH="/home/serge/.minishift/cache/oc/v3.10.0/linux:$PATH"
# Run this command to configure your shell:
# eval $(minishift oc-env)
$ eval $(minishift oc-env)
Se connecter sur minishift:
$ docker login -u `oc whoami` -p `oc whoami --show-token` 172.30.1.1:5000
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /home/f074170/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
Création d'un nouveau projet:
$ oc new-project oracle --display-name=Oracle
Tag de l'image avec le nom de la registry:
$ docker tag oracle/database:12.2.0.1-ee 172.30.1.1:5000/oracle/database
Push vers la registry:
$ docker push 172.30.1.1:5000/oracle/database
Il est possible d'utiliser skopeo pour copier l'image entre registry.

Déployer l'image dans openshift:
$ oc new-app --image-stream=database --name=oracle12ee
Exposer les services:
$ oc expose service oracle12ee
Résoudre les pbs de droits avec minishift:
$ ./minishift addon apply anyuid
-- Applying addon 'anyuid':.
 Add-on 'anyuid' changed the default security context constraints to allow pods to run as any user.
 Per default OpenShift runs containers using an arbitrarily assigned user ID.
 Refer to https://docs.okd.io/latest/architecture/additional_concepts/authorization.html#security-context-constraints and
 https://docs.okd.io/latest/creating_images/guidelines.html#openshift-origin-specific-guidelines for more information.

Résoudre les pbs de droits avec OPENSHIFT:

$ oc create serviceaccount useroot

$ oc adm policy add-scc-to-user anyuid -z useroot

$ oc patch dc/oracle12ee --patch '{"spec":{"template":{"spec":{"serviceAccountName": "useroot"}}}}'
 
 
Liens:
https://blog.dbi-services.com/oracle-database-on-openshift/
https://geraldonit.com/2017/08/21/creating-an-oracle-database-docker-image/
https://medium.com/@adilsonbna/importing-an-external-docker-image-into-red-hat-openshift-repository-c25894cd3199
https://piotrminkowski.wordpress.com/tag/openshift/
https://blog.openshift.com/understanding-service-accounts-sccs/