Installing Docker for Mac is super easy. It is a simple as downloading and copying the program to the application folder.
To download Docker for Mac visit the docker site:
https://docs.docker.com/docker-for-mac/
Please download the stable release.
Simply Drag and Drop the Docker icon to the Application folder. It is that easy to install Docker on the Mac.
Launch Docker from the applications folder. Since this is the first time you are invoking Docker, you will get the standard message about Docker being an “… application downloaded from the Internet. Are you sure that you want to open it?” Click on the Open button.
At the Welcome screen, click on the Next button
Click on the OK button to allow for privileged access.
You will be asked to provide your password. Enter your password to finish the installation process. Now, you will see docker on your task bar on top of the screen.
Optionally un-select the Send diagnostics & usage data check box; click on “Got it” button to complete the installation.
Now from any terminal, type the following commands:
Dobbys-MacBook-Pro:~ Dobby$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES Dobbys-MacBook-Pro:~ Dobby$ docker info Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 0 Server Version: 1.12.3 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 0 Dirperm1 Supported: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: null host bridge overlay Swarm: inactive Runtimes: runc Default Runtime: runc Security Options: seccomp Kernel Version: 4.4.27-moby Operating System: Alpine Linux v3.4 OSType: linux Architecture: x86_64 CPUs: 4 Total Memory: 1.951 GiB Name: moby ID: YGJ4:TIP6:KYX5:EK5X:REV3:3KEL:O3AP:6UIF:2DGX:YYDR:OGCX:QOSY Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): true File Descriptors: 15 Goroutines: 27 System Time: 2016-11-19T15:45:11.894167372Z EventsListeners: 1 No Proxy: *.local, 169.254/16 Registry: https://index.docker.io/v1/ WARNING: No kernel memory limit support Insecure Registries: 127.0.0.0/8
Next, click on the Docker logo on the top status bar and select Preferences. Move the memory indicator to 4GB or more and click the restart button at the button of the screen.
Here’s a simple script that anyone can use to check for lags in Data Guard. Basically, there’s two kind of lags in Data Guard that we want to monitor. The first is the apply_lag which is the amount of time the standby database is lagging behind relative to the primary database due to application of redo data. The second is the transport_lag which provides information about how much redo data is behind (in terms of time) because it is not available or applicable on the standby database. The transport lag can be used to determine bandwidth issues between the primary and stanby database sites.
You can specify the MIN_THRESHOLD parameter which will be the 2nd parameter that is passed into the dg_check_lag.ksh script (below). For lot of our customers who are on Active Data Guard, we change this script to determine seconds that the transport and apply lag is behind by. It is common for us to send alerts when the transport or apply lag is greater than 30 seconds for Active Data Guard customers.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
$ cat dg_check_lag.ksh #!/bin/ksh # Script Name: dg_check_lag.ksh # Purpose: To detect transport or apply lag for Data Guard implementations # . $HOME/.ORACLE_BASE export DB=$1 export MIN_THRESHOLD=$2 export ORACLE_SID=${DB} echo $ORACLE_SID export ORAENV_ASK=NO export PATH=/usr/local/bin:/bin:/usr/bin:$PATH . oraenv export LOGFILE=/tmp/check_lag_${DB}.log export FN=`echo $0 | sed s/\.*[/]// |cut -d. -f1` sqlplus -s /nolog <<EOF conn / as sysdba col name for a13 col value for a20 col unit for a30 set pages 0 head off feed off ver off echo off trims on spool $LOGFILE select name||'|'||value from v\$dataguard_stats where NAME IN ('transport lag', 'apply lag'); spool off exit; EOF export ERROR_COUNT=$(grep -c ORA- $LOGFILE) if [ "$ERROR_COUNT" -gt 0 ]; then cat $LOGFILE |mail -s "DG Transport/Apply error for $DB ... ORA- errors encountered!" DBAs@viscosityna.com fi TLAG=$(cat $LOGFILE |grep "transport lag" |cut -d'|' -f2) ALAG=$(cat $LOGFILE |grep "apply lag" |cut -d'|' -f2) echo "Transport Lag: $TLAG ------ Apply Lag: $ALAG" export T_DAYS=$(echo $TLAG |cut -d' ' -f1 |sed -e "s/\+//g") export T_HRS=$(echo $TLAG |cut -d' ' -f2 |cut -d: -f1) export T_MINS=$(echo $TLAG |cut -d' ' -f2 |cut -d: -f2) echo $T_DAYS $T_HRS $T_MINS export A_DAYS=$(echo $ALAG |cut -d' ' -f1 |sed -e "s/\+//g") export A_HRS=$(echo $ALAG |cut -d' ' -f2 |cut -d: -f1) export A_MINS=$(echo $ALAG |cut -d' ' -f2 |cut -d: -f2) echo $A_DAYS $A_HRS $A_MINS echo "MIN_THRESHOLD: $MIN_THRESHOLD" export ALERT_LOG_FILE=/tmp/check_lag_${DB}.alert [ -f "$ALERT_LOG_FILE" ] && rm $ALERT_LOG_FILE [ "$T_DAYS" -gt 00 ] && echo "Transport Lag is greater than 1 day!!!" |tee -a $ALERT_LOG_FILE [ "$T_MINS" -gt $MIN_THRESHOLD ] && echo "Transport Lag exceeeded our threshold limit of $MIN_THRESHOLD mins .. curently behind $T_DAYS day(s) $T_HRS hrs and $T_MINS mins" |tee -a $ALERT_LOG_FILE [ "$A_DAYS" -gt 00 ] && echo "Apply Lag is greater than 1 day!!!" |tee -a $ALERT_LOG_FILE [ "$A_MIN" -gt $MIN_THRESHOLD ] && echo "Apply Lag exceeeded our threshold limit of $MIN_THRESHOLD mins .. curently behind $A_DAYS day(s) $A_HRS hrs and $A_MINS mins" |tee -a $ALERT_LOG_FILE if [ -s $ALERT_LOG_FILE ]; then echo "" >> $ALERT_LOG_FILE echo "--------- Check to see if MRP is Running -------------" >> $ALERT_LOG_FILE ps -ef |grep -i mrp |grep -v grep >> $ALERT_LOG_FILE $SH/alert_notification.ksh $FN `hostname` DB "" "DG Transport/Apply for $DB is behind ... behind $T_DAYS day(s) $T_HRS hrs and $T_MINS mins" $ALERT_LOG_FILE fi |
Stay tuned as I will reveal scripts to monitor gaps in archive log sequences. I use the term gap loosely here as it is not determining the gap from v$archive_gap but looking at the number of applied archive logs on the standby database and comparing the applied archive logs to the maximum sequence number based on the thread number.
Come visit Viscosity North America for latest updates to local events, white papers and case studies.
In the first part of this series, we went through installing Oracle Linux 7 Update 2. In this part of the series, we will configure the Oracle Linux UEK OS, configure the docker image, and configure OSCSA (Oracle Storage Cloud Software Appliance).
First add the UEKR4 channel to the /etc/yum.repos.d/ repository:
[ol7_UEKR4] name=Latest Unbreakable Enterprise Kernel Release 4 for Oracle Linux $releasever ($basearch) baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/UEKR4/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1
We need to boot the Linux Host Using the UEK4 Kernel. The UEK version that ships from Oracle Linux 7 update 2 is UEK 3 Release 8.
We need to remove the UEK 3.8 first. You will encounter errors about the packages that the 3.8 kernel is dependent on. If you see such errors similar to what you see below, you can ignore them.
[root@oscsa yum.repos.d]# rpm -qa |grep -i kernel kernel-uek-firmware-3.8.13-98.7.1.el7uek.noarch kernel-uek-3.8.13-98.7.1.el7uek.x86_64 kernel-tools-3.10.0-327.el7.x86_64 kernel-3.10.0-327.el7.x86_64 kernel-tools-libs-3.10.0-327.el7.x86_64 abrt-addon-kerneloops-2.1.11-34.0.1.el7.x86_64 [root@oscsa yum.repos.d]# rpm -e kernel-uek warning: file /lib/modules/3.8.13-98.7.1.el7uek.x86_64/modules.symbols.bin: remove failed: No such file or directory warning: file /lib/modules/3.8.13-98.7.1.el7uek.x86_64/modules.softdep: remove failed: No such file or directory warning: file /lib/modules/3.8.13-98.7.1.el7uek.x86_64/modules.devname: remove failed: No such file or directory warning: file /lib/modules/3.8.13-98.7.1.el7uek.x86_64/modules.dep.bin: remove failed: No such file or directory warning: file /lib/modules/3.8.13-98.7.1.el7uek.x86_64/modules.builtin.bin: remove failed: No such file or directory warning: file /lib/modules/3.8.13-98.7.1.el7uek.x86_64/modules.alias.bin: remove failed: No such file or directory [root@oscsa yum.repos.d]# rpm -qa |grep -i kernel kernel-uek-firmware-3.8.13-98.7.1.el7uek.noarch kernel-tools-3.10.0-327.el7.x86_64 kernel-3.10.0-327.el7.x86_64 kernel-tools-libs-3.10.0-327.el7.x86_64 abrt-addon-kerneloops-2.1.11-34.0.1.el7.x86_64 [root@oscsa yum.repos.d]# rpm -e kernel-uek-firmware-3.8.13-98.7.1.el7uek.noarch
Now we can install UEK 4:
[root@oscsa yum.repos.d]# yum install kernel-uek Loaded plugins: langpacks, ulninfo ol7_UEKR3 | 1.2 kB 00:00:00 ol7_UEKR4 | 1.2 kB 00:00:00 ol7_latest | 1.4 kB 00:00:00 (1/2): ol7_UEKR4/x86_64/updateinfo | 32 kB 00:00:00 (2/2): ol7_UEKR4/x86_64/primary | 8.9 MB 00:00:03 ol7_UEKR4 208/208 Resolving Dependencies --> Running transaction check ---> Package kernel-uek.x86_64 0:4.1.12-61.1.16.el7uek will be installed --> Processing Dependency: kernel-firmware = 4.1.12-61.1.16.el7uek for package: kernel-uek-4.1.12-61.1.16.el7uek.x86_64 --> Processing Dependency: dracut-kernel >= 033-360.0.3 for package: kernel-uek-4.1.12-61.1.16.el7uek.x86_64 --> Processing Dependency: linux-firmware >= 20160604-44.git57b649d9.0.2 for package: kernel-uek-4.1.12-61.1.16.el7uek.x86_64 --> Running transaction check ---> Package dracut.x86_64 0:033-359.0.1.el7 will be updated --> Processing Dependency: dracut = 033-359.0.1.el7 for package: dracut-network-033-359.0.1.el7.x86_64 --> Processing Dependency: dracut = 033-359.0.1.el7 for package: dracut-config-rescue-033-359.0.1.el7.x86_64 ---> Package dracut.x86_64 0:033-360.0.3.el7_2.1 will be an update ---> Package kernel-uek-firmware.noarch 0:4.1.12-61.1.16.el7uek will be installed ---> Package linux-firmware.noarch 0:20150904-43.git6ebf5d5.0.1.el7 will be updated ---> Package linux-firmware.noarch 0:20160604-44.git57b649d9.0.2.el7 will be an update --> Running transaction check ---> Package dracut-config-rescue.x86_64 0:033-359.0.1.el7 will be updated ---> Package dracut-config-rescue.x86_64 0:033-360.0.3.el7_2.1 will be an update ---> Package dracut-network.x86_64 0:033-359.0.1.el7 will be updated ---> Package dracut-network.x86_64 0:033-360.0.3.el7_2.1 will be an update --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================= Package Arch Version Repository Size ========================================================================================================================================================= Installing: kernel-uek x86_64 4.1.12-61.1.16.el7uek ol7_UEKR4 42 M Installing for dependencies: kernel-uek-firmware noarch 4.1.12-61.1.16.el7uek ol7_UEKR4 2.0 M Updating for dependencies: dracut x86_64 033-360.0.3.el7_2.1 ol7_latest 311 k dracut-config-rescue x86_64 033-360.0.3.el7_2.1 ol7_latest 49 k dracut-network x86_64 033-360.0.3.el7_2.1 ol7_latest 90 k linux-firmware noarch 20160604-44.git57b649d9.0.2.el7 ol7_latest 31 M Transaction Summary ========================================================================================================================================================= Install 1 Package (+1 Dependent package) Upgrade ( 4 Dependent packages) Total download size: 75 M Is this ok [y/d/N]: y Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. warning: /var/cache/yum/x86_64/7Server/ol7_latest/packages/dracut-033-360.0.3.el7_2.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY Public key for dracut-033-360.0.3.el7_2.1.x86_64.rpm is not installed (1/6): dracut-033-360.0.3.el7_2.1.x86_64.rpm | 311 kB 00:00:00 (2/6): dracut-config-rescue-033-360.0.3.el7_2.1.x86_64.rpm | 49 kB 00:00:00 (3/6): dracut-network-033-360.0.3.el7_2.1.x86_64.rpm | 90 kB 00:00:00 Public key for kernel-uek-firmware-4.1.12-61.1.16.el7uek.noarch.rpm is not installed ] 1.8 MB/s | 8.7 MB 00:00:37 ETA (4/6): kernel-uek-firmware-4.1.12-61.1.16.el7uek.noarch.rpm | 2.0 MB 00:00:03 (5/6): kernel-uek-4.1.12-61.1.16.el7uek.x86_64.rpm | 42 MB 00:00:24 (6/6): linux-firmware-20160604-44.git57b649d9.0.2.el7.noarch.rpm | 31 MB 00:00:26 --------------------------------------------------------------------------------------------------------------------------------------------------------- Total 2.8 MB/s | 75 MB 00:00:27 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle Importing GPG key 0xEC551F03: Userid : "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>" Fingerprint: 4214 4123 fecf c55b 9086 313d 72f9 7b74 ec55 1f03 Package : 7:oraclelinux-release-7.2-1.0.5.el7.x86_64 (@anaconda/7.2) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle Is this ok [y/N]: y Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Updating : dracut-033-360.0.3.el7_2.1.x86_64 1/10 Updating : linux-firmware-20160604-44.git57b649d9.0.2.el7.noarch 2/10 Installing : kernel-uek-firmware-4.1.12-61.1.16.el7uek.noarch 3/10 Installing : kernel-uek-4.1.12-61.1.16.el7uek.x86_64 4/10 Updating : dracut-network-033-360.0.3.el7_2.1.x86_64 5/10 Updating : dracut-config-rescue-033-360.0.3.el7_2.1.x86_64 6/10 Cleanup : dracut-config-rescue-033-359.0.1.el7.x86_64 7/10 Cleanup : dracut-network-033-359.0.1.el7.x86_64 8/10 Cleanup : linux-firmware-20150904-43.git6ebf5d5.0.1.el7.noarch 9/10 Cleanup : dracut-033-359.0.1.el7.x86_64 10/10 Verifying : dracut-033-360.0.3.el7_2.1.x86_64 1/10 Verifying : dracut-network-033-360.0.3.el7_2.1.x86_64 2/10 Verifying : kernel-uek-firmware-4.1.12-61.1.16.el7uek.noarch 3/10 Verifying : kernel-uek-4.1.12-61.1.16.el7uek.x86_64 4/10 Verifying : dracut-config-rescue-033-360.0.3.el7_2.1.x86_64 5/10 Verifying : linux-firmware-20160604-44.git57b649d9.0.2.el7.noarch 6/10 Verifying : dracut-config-rescue-033-359.0.1.el7.x86_64 7/10 Verifying : dracut-033-359.0.1.el7.x86_64 8/10 Verifying : linux-firmware-20150904-43.git6ebf5d5.0.1.el7.noarch 9/10 Verifying : dracut-network-033-359.0.1.el7.x86_64 10/10 Installed: kernel-uek.x86_64 0:4.1.12-61.1.16.el7uek Dependency Installed: kernel-uek-firmware.noarch 0:4.1.12-61.1.16.el7uek Dependency Updated: dracut.x86_64 0:033-360.0.3.el7_2.1 dracut-config-rescue.x86_64 0:033-360.0.3.el7_2.1 dracut-network.x86_64 0:033-360.0.3.el7_2.1 linux-firmware.noarch 0:20160604-44.git57b649d9.0.2.el7 Complete!
Generate a new grub.cfg file:
[root@oscsa ~]# grub2-mkconfig > grub.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-4.1.12-61.1.16.el7uek.x86_64 Found initrd image: /boot/initramfs-4.1.12-61.1.16.el7uek.x86_64.img Found linux image: /boot/vmlinuz-3.10.0-327.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-327.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-09ec9b0ef1b542bcbde9147e2e5d21e8 Found initrd image: /boot/initramfs-0-rescue-09ec9b0ef1b542bcbde9147e2e5d21e8.img done
Move the updated grub.cfg file to the grub2 directory:
[root@oscsa ~]# mv grub.cfg /boot/grub2 mv: overwrite ‘/boot/grub2/grub.cfg’? y
We need to disable SELinux in the Host. SELinux is currently not supported and should be disabled.
[root@oscsa grub2]# cat /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of three two values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted
Then we need to reboot the server
[root@oscsa grub2]# reboot
After the reboot, let’s make sure that SELinux is disabled:
[root@oscsa ~]# sestatus SELinux status: disabled
Let’s also make sure that we are booting off the new UEK 4 kernel release:
[root@oscsa ~]# uname -a Linux oscsa.viscosityna.com 4.1.12-61.1.16.el7uek.x86_64 #2 SMP Fri Oct 21 14:23:20 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux
We need to edit the /etc/yum.repos.d/public-yum-ol7.repo file on the host and enable the channels for adding and optional_latest:
• Change the value of enable to 1 in addons.
• Change the value of enable to 1 in optional_latest.
Here’s what these sections should look like:
[ol7_optional_latest] name=Oracle Linux $releasever Optional Latest ($basearch) baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/optional/latest/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1 [ol7_addons] name=Oracle Linux $releasever Add ons ($basearch) baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/addons/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1