Tutor Open edX commands - openedx

what is the actual difference in these 3 commands? Looking for a quick reply. Thank you.
tutor local quickstart | tutor local start | tutor local reboot
#tutor

tutor local quickstart
is what you use the first time you install Tutor.
Then after that you just use
tutor local start
After you have modified any data and saved it with
tutor config save
It is advised to restart your platform to apply those changes with
tutor local reboot

Related

Fail Connect to Running Phoenix Applications with IEx Remote Shell at Docker

Im deploy phx app using docker, running --remsh command from within the same container.
But it return could not contact remote node.
Anybody know the solution ?
Here is the snapshot
You seem to start the application as :nonode#nohost. To connect to it, you should have it started with either a short or fully qualified name.
mix release.init creates rel folder with two template files in it. Check env.sh.eex and make sure you start a release with a short name given. This should work:
export RELEASE_DISTRIBUTION=sname
export RELEASE_NODE=<%= #release.name %>
Sidenote: please post everything as plain text, not as images.
There is a problem in your command, please use --cookie instead of -cookie

Docker: How do I add myself to the docker-users group on windows 10 home?

I am getting the following error
The current user is not in the 'docker-users' group. Add yourself to
the 'docker-users' group and then log out and back in to Windows.
How do I solve this on Windows 10 Home? All the examples I find are for enterprise or pro versions of Windows.
Run this command from an administrator command window to add your user id to the docker-users group and log back into your user account for it to take effect.
net localgroup docker-users "your-user-id" /ADD
your-user-id is your local Windows user name. You can determine this by looking at the folder name under C:\Users\ .
It might occur that the user-group "docker-users" not exist on your machine. In that case enter the following commands in the Powershell
New-LocalGroup -Name 'docker-users' -Description 'docker Users Group'
Add-LocalGroupMember -Group 'Administrators' -Member ('docker-users') –Verbose
Add-LocalGroupMember -Group 'docker-users' -Member ('Username','Administrators') –Verbose
Try restarting the system, that worked for me, as it pushed me to the group automatically.
If you are installing Docker Desktop from Chocolatey, you might only need a restart, as you are put in that group automatically.
In my case, I just uninstall and reinstall the docker. And it fine now.

How to backup and restore Open edX from one server to other?

I have an Open edX system run entire in only one server, but system performance is bad. Its RAM consuming is being increased day by day, now I wan to backup and restore to other bigger server.
Document of Open edX is hard to reach this information, and I've searched for a while but don't get what I want. If you know this, please guide me on this problem
Many thanks,
You need to backup edxapp and cs_comments_service_development database in mongodb and all data from mysql.
Backing up:
mysqldump edxapp -u root --single-transaction > backup/backup.sql
mongodump --db edxapp
mongodump --db cs_comments_service_development
Restoring:
mysql -u root edxapp < backup.sql
mongo edxapp --eval "db.dropDatabase()"
mongorestore dump/
It worked for me. Copies all courses, accounts, progress and discussions.
Idea taken from BluePlanetLife/openedx-server-prep, for more details, look here
This might not be a exact answer also not a standard solution for production environment, but might help you.
Manual way can be as follows:
You can setup a new edX instance on a new server.
Update all your repos edx-platform, custom xblocks to appropriate branch,tag.
(The database replacement point 3 and 4 below i haven't tested for production environment.)
replace the mysql databases 'edxapp', 'ora', 'xqueue' in new server with older ones.
replace mongodb databases 'cs_comments_service_development', 'edxapp' in new server with older ones.
I was able to replace mysql 'edxapp' database on the devstack.

google compute engine instances timezone changed to UTC automatically

I'm a new user of GCE instances.
I created instances a week ago and changed timezone to Asia/Shanghai by commands below:
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
Then yesterday, I found that my system timezone changed to UTC automatically and /etc/localtime was changed. So I run the command above agina. Until now it's OK.
After that I checked many resources and export TZ='Asia/Shanghai'. But I still not know if it's the root cause or not.
Also I find that someone adds xen.independent_wallclock=1 in sysctl.conf file to maintain independent times. But it's for Xen VM and I'm not sure if it's useful for GCE.
Could anyone please take a look at it ?
I've found a more user friendly approach here
Go root user
sudo -s
and use
dpkg-reconfigure tzdata
This will bring up a GUI which will guide you to change your timezone information
To make the permanent change edit $HOME/.profile or $HOME/.bash_profile appending the line and then log out and log in again:
TZ='Asia/Shanghai'; export TZ
for windows users open powershell as admin and type TZUtil.exe /s "<your new time zone>".
to see a list of all available time zones type TZUtil.exe /l.
for more info type TZUtil.exe /?.

RAILS, CUCUMBER: Getting the testing server address

While running a cucumber test, I need to know the local testing server address. It will be something like "localhost:47632". I've searched the ENV but it isn't in there, and I can't seem to find any other variables that might have it. Ideas?
I believe that the port is generated is dynamically generated on test runs. You can use OS level tools to inspect what connections are opened by process and glean the port that way. I do this on my ubuntu system infrequently so I can't tell you off the top of my head what tool does that. Netstat maybe? I always have to go out and google for it so consider this more of a hint than a complete answer.
Ah, to be more clear...I put a debug breakpoint in, and when it breaks THEN I use the OS level tools to see what port the test server is running on at that moment in time. How to discover it predictively? No idea, sorry.
here's what I use:
netstat -an | grep LISTEN
(Answering my own question just so that the code formatting will be correct)...
Using jaydel's idea to use netstat, here's the code. I extract the line from netstat that has the current pid. (Probably not the most elegant way to do this, but it works)
value = %x( netstat -l -p --tcp )
pid = $$.to_s
local_port = ""
value.split( "\n" ).each do |i|
if i.include?( pid )
m = i.match( /\*:(\d+)/ )
local_port = m[1].to_s
end
end

Resources