Installing Driverless AI on AWS - driverless-ai

I've installed the DAI community app on an AWS instance following these instructions:
http://docs.h2o.ai/driverless-ai/latest-stable/docs/userguide/install/aws.html
https://localhost:12345 gives me the login screen. The standard credentials "h2oai" and "h2oai" return "Invalid User Id or Password". What are the credentials?
Also, DAI installed to /opt. I do not see the /data and /license folders anywhere. Where are they?

I expect that you are probably using the AWS Marketplace image and not the community ami. The AWS Marketplace image is password protected in order to observe AWS Marketplace standards. The username should be 'h2oai' and the password would be the AWS Instance ID.
With respect to the folders, the AWS Marketplace image uses our Debian install package. See documentation here: http://docs.h2o.ai/driverless-ai/latest-stable/docs/userguide/install/linux-deb.html for information about which folders are available where. The software will be installed into /opt/h2oai/dai, and you will find the log folder there, but it is better for you to access the logs and such via systemctl and journalctl.
NOTE: additional configurations folder can be found at /etc/dai

Related

how do you install R packages from a private git repo with a PAT?

I am trying to install an R package from a private git repository hosted on my employer's internal Bitbucket server.
I have had success using remotes::install_git() for other projects on public servers in the past however for this specific project I need to connect to the repository via an HTTPS url and use a personal access token (PAT) to authenticate. The remotes::install_git() documentation includes an entry for adding credentials, but the documentation for this option is sparse. There is a lot of documentation for remotes::install_github(), but as this is not a github hosted repository, many of the suggestions there do not seem to work.
My go to :
gitcred <- git2r::cred_user_pass(username="$(USERNAME)",password="$(PAT)")
#here you can put any private repo such as devops azure or bitbucket, etc..
remotes::install_git("https://dev.azure.com/XXX", credentials = gitcred)'

Cloning AWS codecomit repo

I just started with the AWS codestar and wanted to clone the codecomit repo. I generated the username and password for the repo and had it saved.
I am trying to enter username and password but every time I get Unable to access error with code 403.
I have 2 question here on:
1) is there an easy way to just copy the password from .csv file which I downloaded from AWS in the git command while cloning the repo.
Typing that long password is nerve wrecking.
2) Is there a way to create a second set of git config which can be used with this repo as I already have some other git credentials saved which I do not wish to override as part of global config. Something like we do in aws-cli named profiles.
Here's the answer from Amazon AWS forum link. I hope this will answer all you queries.

Swisscom CloudFoundry with SSH keys

I try to install Wordpress on the Swisscom CloudFoundry application cloud. To install it I need SSH with private and public key pairs (not cf ssh).
I follow the steps here:
https://github.com/cloudfoundry-samples/cf-ex-wordpress
Is this possible? What are the correct values for:
SSH_HOST: user#my-ssh-server.name
SSH_PATH: /home/sshfs/remote
Is this possible?
It depends on your CF provider. This method of running Wordpress requires that you use a FUSE filesystem (SSHFS) to mount the remote files system over the wp-content directory of your Wordpress install. In recent versions of CF (I can't remember exactly where this changed) you are no longer allowed to use FUSE based file systems.
Before you spend a lot of time on this, you might want to validate that your provider still allows FUSE. You can validate with a simple test.
Push any test app to your provider.
cf ssh into the application container.
Check that the sshfs binary is available.
Try using sshfs to mount a remote filesystem (man page | examples).
If you can successfully mount a remote filesystem via SSH using the steps above then you should still be able to use the method described in that example application.
If you cannot, the next best option is to use a plugin that allows storing your media on a remote system. Most of these are for S3. Search google or the WP plugin repo, they're easy enough to find.
There is a better solution on the horizon called Volume Services. You can read more about this here. I have not seen any public CF providers offering volume services though.
What are the correct values for:
SSH_HOST: user#my-ssh-server.name
This should be the user name and host name of your SSH server. This is a server that exists outside of CF. Examples: my-user#192.0.2.10 or some-user#host.example.com. You should be able to ssh <this-value> and connect without entering a password. This is so that the volume can automatically be mounted without user interaction when your app starts.
SSH_PATH: /home/sshfs/remote
This is the full path on the remote server where you'd like to store the Wordpress files. In other words, this directory will be mounted as the wp-content directory of your app.

How to access a private github repository from Aegir through Drush Make on AWS

I have an ec2 instance running on AWS. Aegir installed and drush make works perfect for installing new platforms except when I need to download a theme from a private github repository.
drush make doesn't have access to the github private repository and fails the platform install.
How do I overcome this? Is there some fancy way to give drush make or the aegir user ssh keys for the git repository?
I don't know much about ssh-agent, but I figured maybe getting that to run all the time on my server so aegir will have access to my github.
how to make drush make access a private github repository?
Generate an SSH key on the EC2 instance, then add the public key (usually id_rsa.pub) to the private repository as a deoploy key.
stevenh512 is right,a step by step explanation follows:
Disclaimer: I use GitLab + custom VPS on Centos but the same workflow can be applied on any hosting (with ssh) and GitHub (ps I love GitLab for private repos)
Login to VPS as aegir, probably you can’t (if you configure your server tightly secure) so login as root an su aegir
Go to home dir (cd /var/aegir) and check is you have an SSH key. If you have one jump 1 step.
cat ~/.ssh/id_rsa.pub
If you don’t have create one and don’t use a pass-phrase (for more info http://community.aegirproject.org/node/30#SSH_keys but there are solutions if you want a pass-phrase). After the creation you will have the key’s random image. (Study the SSH it's too important for security!)
ssh-keygen -t rsa
Copy the key and then go to you GitHub/Lab->account/profile settings->SSH keys->Add SSK key. For title give anything you want (like: Aegir Key) and for key paste the key from your server.
cat ~/.ssh/id_rsa.pub
Now back to server you must add the Git as known host, we go the easy way: just login with ssh and type yes when it will ask for connection. Ready!!
ssh git#github.com
- or -
ssh git#gitlab.com
Testing: make a .make file and save it somewhere public (like Dropbox, right click copy public url) like:
core = 7.x
api = 2
projects[drupal][version] = 7.26
projects [my_module_name][type] = "module"
projects [my_module_name][download][type] = "git"
projects [my_module_name][download][url] = "git#gitlab.com:my_repo.git"
projects [my_module_name][download][branch] = "master"
Go to aegir gui and create an new platform and wait for verification (otherwise you can ssh as aegir to the server and test it with drush make url.make folder)
Warning! This workflow isn’t the most secure! Just experiment with it and configure proper your server!
Info: This workflow also works for your local dev machine (linux, mac, cygwin) to play with private repositories on GitHub and GitLab

Best way to install web applications (e.g. Jira) on Unixes?

Can you throw some points on how it is a best way, best practice
to install web application on Unixes?
Like:
where to place app and its bases and so for,
how to configure to be secure and easy to backup,
etc
For example I know such suggestion -- to set uniq user for each app.
App in question is Jira on FreeBSD, but more general suggestions are also welcomed.
Here's what I did for my JIRA install on Fedora Linux:
Create a separate user to run JIRA
Install JIRA under the JIRA user's home directory
Made a soft link "/home/jira/jira" pointing to the JIRA installation directory (the directory as installed contains the version number, something like /home/jira/atlassian-jira-enterprise-4.0-standalone)
Created an /etc/init.d script to run JIRA as a service, and added it to chkconfig so that it runs at system startup - see these instructions
Created a MySQL database for JIRA on a separate data volume
Set up scheduled XML backups via the JIRA admin interface
Set up a remote backup script to dump the MySQL database and copy the DB dump and XML backups to a separate backup server
In order to avoid having to open extra firewall ports, set up an Apache virtual host "jira.myhost.com" and used mod_proxy to forward requests to the JIRA URL.
I set everything up on a virtual machine (an Amazon EC2 instance in my case) and cloned the machine image so that I can easily restart a new instance if the current one goes down.

Resources